1.7.0 • Published 7 years ago

node-stream v1.7.0

Weekly downloads
3,501
License
MIT
Repository
github
Last release
7 years ago

Node-Stream

Build Status bitHound Score Test Coverage

A Stream is a core interface in Node which is generally misunderstood. Since Node doesn't provide a simple API for them, they are very often misused. This library aims to resolve those problems by exposing a collection of array-like methods for working with Node Streams.

Every function in Node-Stream returns an instance of a Streams3 Stream which means you'll be using the latest implementation of Streams. This library works with the latest Streams as well as Node 0.12 Streams.

const nodeStream = require('node-stream');

// Get the 5 most recent posts by stezu
db.createReadStream()
    .pipe(nodeStream.where({ type: 'post', author: 'stezu' }))
    .pipe(nodeStream.sort((a, b) => a.id > b.id))
    .pipe(nodeStream.take(5))
    .pipe(nodeStream.stringify())
    .pipe(nodeStream.intersperse('\n'))
    .pipe(process.stdout);

Install

You can install using npm:

npm install --save node-stream

You can then require() node-stream:

const nodeStream = require('node-stream');

Documentation

Documentation can be found at http://stezu.github.io/node-stream/.

1.7.0

7 years ago

1.6.0

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago