through-parse

parse json in a through stream, extracted from event stream. instead of console.error, emits.

npm install through-parse
1 downloads in the last day
5 downloads in the last week
26 downloads in the last month

SYNOPSIS

Breaks out parse() from event stream, emits errors instead of console.error(). If you are intending on parsing JSON that comes from an unknown source, you should use JSONParse.

USAGE

var parse = require('through-parse')

stream
  .pipe(parse())
  .pipe(through(function(obj) {
      if (obj.id == 'foo') {
        obj.id = 'bar'
        this.push(obj)
      }
  }).pipe(stream)
npm loves you