Skip to content

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

Notifications You must be signed in to change notification settings

heapwolf/through-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published