json-list-stream

json-list-stream

JSON List Stream

json-list-stream

var List = require('json-list-stream')
 
var list = new List()
  , i = 0
 
list.set('hello', { name: 'World' })
list.write({ 'n': ++})
list.write({ 'n': ++})
list.set('count', i)
list.end()
 
list.pipe(process.stdout)
$ node example.js
 
{"hello":{"name":"World"},"rows":[
{"n":1},
{"n":2}
],"count":2}
$ npm install json-list-stream
$ npm test

MIT