All Projects → fent → node-jstream

fent / node-jstream

Licence: MIT license
Continuously reads in JSON and outputs Javascript objects.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-jstream

JSONPath.sh
JSONPath implementation in Bash for filtering, merging and modifying JSON
Stars: ✭ 45 (+246.15%)
Mutual labels:  json-parser
qtprotobuf
Protobuf generator and bindings for Qt framework
Stars: ✭ 138 (+961.54%)
Mutual labels:  json-parser
parse it
A python library for parsing multiple types of config files, envvars & command line arguments that takes the headache out of setting app configurations.
Stars: ✭ 86 (+561.54%)
Mutual labels:  json-parser
node-advanced
Node Advanced Courseware
Stars: ✭ 80 (+515.38%)
Mutual labels:  stream
simple json
Simple way to dynamically convert from and to JSON using build-time generators given a type.
Stars: ✭ 15 (+15.38%)
Mutual labels:  json-parser
multipart-read-stream
Read a multipart stream over HTTP
Stars: ✭ 13 (+0%)
Mutual labels:  stream
binary
Clojure API for binary format I/O using java's stream apis
Stars: ✭ 67 (+415.38%)
Mutual labels:  stream
react-webrtc-chat
React WebRTC chat
Stars: ✭ 39 (+200%)
Mutual labels:  stream
cj5
Very minimal single header JSON5 parser in C99, derived from jsmn
Stars: ✭ 33 (+153.85%)
Mutual labels:  json-parser
fridgefm-radio-core
Simple lightweight package for creating your own radio station via NodeJS heavily inspired by Shoutcast and Icecast.
Stars: ✭ 32 (+146.15%)
Mutual labels:  stream
dsm
Declarative Stream Mapping (DSM) is a stream de/serializer library for XML and JSON. DSM allows you to make custom parsing, filtering, transforming, aggregating, grouping on any JSON or XML document at stream time(read only once).
Stars: ✭ 23 (+76.92%)
Mutual labels:  json-parser
live-torrent-backend
The backend server for the live-torrent project
Stars: ✭ 38 (+192.31%)
Mutual labels:  stream
live-stream-media-source-extensions
Live stream h264 encoded mp4 video on media source extensions using ffmpeg, node.js, socket.io, and express. Works in chrome, firefox, safari, and android. Not iOS compatible. Work has moved to mse-live-player repo =>
Stars: ✭ 24 (+84.62%)
Mutual labels:  stream
net-Socket
A minimalist wrapper around System.Net.Sockets.Socket.
Stars: ✭ 21 (+61.54%)
Mutual labels:  stream
wise-river
Object streaming the way it should be.
Stars: ✭ 33 (+153.85%)
Mutual labels:  stream
RxLoading
RxJava library for showing a loading (i.e. progress bar) state while waiting for async data with minimal effort and advanced options.
Stars: ✭ 49 (+276.92%)
Mutual labels:  stream
deep-action-detection
Multi-stream CNN architectures for action detection with actor-centric filtering
Stars: ✭ 24 (+84.62%)
Mutual labels:  stream
node-stream-equal
Test that two readable streams are equal to each other.
Stars: ✭ 24 (+84.62%)
Mutual labels:  stream
irc-tts
Broadcast your IRC channel via a text-to-speech webserver
Stars: ✭ 14 (+7.69%)
Mutual labels:  stream
rxjava2-http
Transmit RxJava2 Flowable over http with non-blocking backpressure
Stars: ✭ 19 (+46.15%)
Mutual labels:  stream

node-jstream

Continuously reads in JSON and outputs Javascript objects. Meant to be used with keep-alive connections that send back JSON on updates.

Build Status Dependency Status codecov

Usage

const JStream = require('jstream');
const request = require('request');

request('http://api.myhost.com/updates.json')
  .pipe(new JStream()).on('data', (obj) => {
    console.log('new js object');
    console.log(obj);
  });

API

new JStream([path])

Creates an instance of JStream. Inherits from Stream. Can be written to and emits data events with Javascript objects.

path can be an array of property names, RegExp's, booleans, and/or functions. Objects that match will be emitted in data events. Passing no path means emitting whole Javascript objects as they come in. For example, given the path ['results', true, 'id'] and the following JSON gets written into JStream

{ "results": [
  {"seq":99230
  ,"id":"newsemitter"
  ,"changes":[{"rev":"5-aca7782ab6beeaef30c36b888f817d2e"}]}
, {"seq":99235
  ,"id":"chain-tiny"
  ,"changes":[{"rev":"19-82224279a743d2744f10d52697cdaea9"}]}
, {"seq":99238
  ,"id":"Hanzi"
  ,"changes":[{"rev":"4-5ed20f975bd563ae5d1c8c1d574fe24c"}],"deleted":true}
] }

JStream will emit newsemitter, chain-tiny, and Hanzi in its data event.

JStream.MAX_BUFFER_LENGTH

Defaults to 64 * 1024.

Install

npm install jstream

Tests

Tests are written with mocha

npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].