How to use cspell-io - 2 common examples

To help you get started, we’ve selected a few cspell-io examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github streetsidesoftware / cspell / packages / cspell-lib / src / util / fileReader.ts View on Github external
export async function readLines(filename: string, encoding: BufferEncoding = 'utf8') {
    try {

        const content = await readFile(filename, encoding);
        return toIterableIterator(content.split(/\r?\n/g));
    } catch (e) {
        return Promise.reject(e);
    }
}
github streetsidesoftware / cspell / packages / cspell-tools / src / compiler / fileWriter.ts View on Github external
export function writeSeqToFile(seq: Sequence, outFile: string): Promise {
    return writeToFileIterableP(outFile, seq);
}

cspell-io

A library of useful I/O functions used across various cspell tools.

MIT
Latest version published 6 days ago

Package Health Score

89 / 100
Full package analysis