1.0.4 • Published 4 years ago

ndjson-parse v1.0.4

Weekly downloads
2,078
License
ISC
Repository
github
Last release
4 years ago

Build Status NPM Version

Simple ndjson Parser

  • NDJSON - Newline delimited JSON

Specs

https://github.com/ndjson/ndjson-spec

Usage

const ndjsonParser = require('ndjson-parse');

const ndjsonString =  `{"some":"thing"}
{"foo":17,"bar":false,"quux":true}
{"may":{"include":"nested","objects":["and","arrays"]}}`

const parsedNdjson = ndjsonParser(ndjsonString);

console.log(parsedNdjson[0].some) // thing

Example NDJSON

 {"some":"thing"}
 {"foo":17,"bar":false,"quux":true}
 {"may":{"include":"nested","objects":["and","arrays"]}}

(with \n line separators)

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago