0.0.1 • Published 3 years ago

@zingle/ndjson v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Node.js library for parsing ND-JSON streams.

Usage

const ndjson = require("@zingle/ndjson");
const docs = getStreamSomehow().pipe(ndjson());

printIds(docs).catch(console.error);

async function printIds(iterable) {
    for await (const doc of iterable) {
        console.log(doc.id);
    }
}