@anzerr/json.stream
TypeScript icon, indicating that this package has built-in type declarations

1.0.16 • Public • Published

Intro

GitHub Actions status | publish

Split a streamed json into parsable chunks.

Install

npm install --save git+https://github.com/anzerr/json.stream.git
npm install --save @anzerr/json.stream

Example

const {JsonStream, Parser} = require('json.stream');

let s = new JsonStream();

s.on('data', (chunk) => {
	console.log(JSON.parse(chunk.toString()));
});

let p = new Parser();
console.log(p.push('{"cat":1}{"cat":2}{"cat":3}').process());

s.write('{"cat":1}{"cat":2}{"cat":3}');

Readme

Keywords

Package Sidebar

Install

npm i @anzerr/json.stream

Weekly Downloads

19

Version

1.0.16

License

MIT

Unpacked Size

4.46 kB

Total Files

5

Last publish

Collaborators

  • anzerr