@cspell/cspell-tools
Version:
Tools to assist with the development of cSpell
11 lines • 349 B
JavaScript
import { readTextFile } from './readTextFile.js';
export async function textFileReader(filename) {
const content = await readTextFile(filename);
const words = content.split('\n').map((s) => s.trim());
return {
type: 'TextFile',
size: words.length,
lines: words,
};
}
//# sourceMappingURL=textFileReader.js.map