it
    Preparing search index...

    Module it-ndjson

    Turn (async)iterable values into JSON and back again.

    import ndjson from 'it-ndjson'
    import all from 'it-all'

    // This can also be an iterator, async iterator, generator, etc
    const values = [0, 1, 2, 3, 4]

    const arr = await all(ndjson.stringify(values))

    console.info(arr) // '0\n', '1\n', '2\n', '3\n', '4\n'

    const res = await all(ndjson.parse(arr))

    console.info(res) // [0, 1, 2, 3, 4]

    Interfaces

    ParseOptions

    Functions

    parse
    stringify