Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heapwolf/through-parse
parse json in a through stream, extracted from event stream. instead of console.error, emits errors to the stream
https://github.com/heapwolf/through-parse
Last synced: 25 days ago
JSON representation
parse json in a through stream, extracted from event stream. instead of console.error, emits errors to the stream
- Host: GitHub
- URL: https://github.com/heapwolf/through-parse
- Owner: heapwolf
- Created: 2013-11-24T05:00:50.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-11-24T05:38:15.000Z (almost 11 years ago)
- Last Synced: 2024-10-18T17:10:13.327Z (26 days ago)
- Language: JavaScript
- Size: 99.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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`](https://github.com/dominictarr/JSONStream).# USAGE
```js
var parse = require('through-parse')stream
.pipe(parse())
.pipe(through(function(obj) {
if (obj.id == 'foo') {
obj.id = 'bar'
this.push(obj)
}
}).pipe(stream)
```