export const generateUtilsReadFileAsText = (file: File, encoding  = 'utf-8'): Promise<string | ArrayBuffer | null> =>{
    return new Promise((res, rej) => {
        const fr = new FileReader();
        fr.onerror = () => { rej(new Error(String(fr.error?.message))) };
        fr.onload = () => { res(fr.result) };
        fr.readAsText(file, encoding);
    });
}