Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-stream

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-stream

Utilities for consuming, creating and manipulating node streams.

  • 1.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-1.82%
Maintainers
1
Weekly downloads
 
Created
Source

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/.

Keywords

FAQs

Package last updated on 28 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc