New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-parser-stream

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-parser-stream

JSON.parse transform stream

0.1.0
latest
npm
Version published
Maintainers
1
Created
Source

JSON Parser Stream

Parse a readable stream of json strings into javascript objects

NPM

Build Status Dependency Status Code Climate

Installation

npm install -S json-parser-stream

Usage

Create an instance of linestream and pipe a readable stream into that instance

var JSONParserStream = require('json-parser-stream')
// parser is an instance of require('stream').Transform
var opts = {
  highWaterMark: 2
}
var parser = new JSONParserStream(opts) // opts is optional

var readStream = {} // a stream of single json strings per data event
var parser = readStream.pipe(splitter)
parser.on('data', function(chunk) {
  console.dir(chunk)  // no line breaks here :)
})
parser.on('finish', function() {
  console.log('finish event called, all json items read')
})

Keywords

stream

FAQs

Package last updated on 09 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts