How to use the isValidTxt function

The isValidTxt function is used to check whether an txt file is valid or not. It accepts a Buffer as an argument.

import { isValidTxt } from 'multiform-validator';
import TxtBuffer from 'txt-buffer';

const buffer: Buffer = TxtBuffer;
const isValid = isValidTxt(buffer);

console.log(isValid);  // true if the txt is valid, false otherwise