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

bufferedstream

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bufferedstream - npm Package Compare versions

Comparing version 1.6.0 to 2.1.0

BufferedStream.js

22

package.json
{
"name": "bufferedstream",
"description": "A solid, reliable stream class for JavaScript",
"author": "Michael Jackson <mjijackson@gmail.com>",
"name": "bufferedstream",
"description": "A stream class for node that reliably buffers until next tick",
"version": "1.6.0",
"version": "2.1.0",
"repository": {
"type": "git",
"url": "git://github.com/mjijackson/bufferedstream.git"
"url": "https://github.com/mjackson/bufferedstream.git"
},
"main": "./buffered-stream.js",
"main": "./BufferedStream",
"scripts": {
"test": "mocha test"
"test": "mocha spec"
},

@@ -17,6 +17,12 @@ "engines": {

},
"dependencies": {},
"dependencies": {
"bops": "~0.1.1",
"d": "~0.1.1",
"event-emitter": "~0.3.1",
"setimmediate": "~1.0.2"
},
"devDependencies": {
"mocha": "1.5.0"
"expect": "~0.1.1",
"mocha": "~1.20.1"
}
}

@@ -1,9 +0,7 @@

[![build status](https://secure.travis-ci.org/mjijackson/bufferedstream.png)](http://travis-ci.org/mjijackson/bufferedstream)
[![build status](https://secure.travis-ci.org/mjackson/bufferedstream.png)](http://travis-ci.org/mjackson/bufferedstream)
BufferedStream is a reliable base class for streams in node programs that buffers data until the next tick of the event loop.
BufferedStream is a flexible event emitter for binary data that reliably emits data on the next turn of the event loop. This greatly enhances the usability of streams by making it easy to setup listeners in the same turn of the event loop before data is emitted.
## Rationale
BufferedStream is designed to operate efficiently in both node.js and browsers.
The details of streams are still being worked out in node core. As of this writing there are several different types of streams in node, including some objects that do not actually inherit from Stream. The goal of this library is to iron out the differences between the various stream-like objects and give user code a reliable, documented API they can use now. If the situation ever improves in node core (which we all hope it will) this code may become obsolete.
## Installation

@@ -17,3 +15,3 @@

The key feature of this class is that anything you write to the stream in the current tick of the event loop is buffered until the next tick. This allows you to register event handlers, pause the stream, etc. reliably without losing any data.
The key feature of this class is that anything you write to the stream in the current turn of the event loop is buffered until the next one. This allows you to register event handlers, pause the stream, etc. reliably without losing any data.

@@ -40,11 +38,11 @@ ```javascript

## Tests
## Specs
Run the tests with [mocha](http://visionmedia.github.com/mocha/):
Run the specs with [mocha](http://visionmedia.github.com/mocha/):
$ mocha test
$ mocha spec
## License
Copyright 2012 Michael Jackson
Copyright 2014 Michael Jackson

@@ -51,0 +49,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Sorry, the diff of this file is not supported yet

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