Comparing version 0.2.0 to 1.0.0-rc1
@@ -1,4 +0,3 @@ | ||
var util = require('util'); | ||
var PassThrough = require('stream').PassThrough || require('readable-stream/passthrough'); | ||
var PassThrough = require('readable-stream/passthrough'); | ||
@@ -32,6 +31,4 @@ module.exports = { | ||
var source = fn.call(this, options); | ||
var that = this | ||
source.on('error', function(err) { | ||
that.emit('error', err) | ||
}) | ||
var emit = this.emit.bind(this, 'error'); | ||
source.on('error', emit); | ||
source.pipe(this); | ||
@@ -51,6 +48,4 @@ }); | ||
var destination = fn.call(this, options); | ||
var that = this | ||
destination.on('error', function(err) { | ||
that.emit('error', err) | ||
}) | ||
var emit = this.emit.bind(this, 'error'); | ||
destination.on('error', emit); | ||
this.pipe(destination); | ||
@@ -57,0 +52,0 @@ }); |
{ | ||
"name": "lazystream", | ||
"version": "0.2.0", | ||
"version": "1.0.0-rc1", | ||
"description": "Open Node Streams on demand.", | ||
@@ -21,8 +21,3 @@ "homepage": "https://github.com/jpommerening/node-lazystream", | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/jpommerening/node-lazystream/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"license": "MIT", | ||
"main": "lib/lazystream.js", | ||
@@ -36,3 +31,3 @@ "engines": { | ||
"dependencies": { | ||
"readable-stream": "~1.0.2" | ||
"readable-stream": "^2.0.5" | ||
}, | ||
@@ -39,0 +34,0 @@ "devDependencies": { |
# Lazy Streams | ||
> *Create streams lazily when they are read from or written to.* | ||
> `lazystream: 0.0.2` [![Build Status](https://travis-ci.org/jpommerening/node-lazystream.png?branch=master)](https://travis-ci.org/jpommerening/node-lazystream) | ||
> `lazystream: 1.0.0` [![Build Status](https://travis-ci.org/jpommerening/node-lazystream.png?branch=master)](https://travis-ci.org/jpommerening/node-lazystream) | ||
@@ -14,3 +14,3 @@ ## Why? | ||
This package provides two classes based on the node's new streams API (or `readable-stream` if you are using node a node version earlier than 0.10): | ||
This package provides two classes based on the node's Streams3 API (courtesy of `readable-stream` to ensure a stable version). | ||
@@ -61,8 +61,4 @@ ## Class: lazystream.Readable | ||
$ npm install lazystream --save | ||
npm http GET https://registry.npmjs.org/readable-stream | ||
npm http 200 https://registry.npmjs.org/readable-stream | ||
npm http GET https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.2.tgz | ||
npm http 200 https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.2.tgz | ||
lazystream@0.2.0 node_modules/lazystream | ||
└── readable-stream@1.0.2 | ||
lazystream@1.0.0 node_modules/lazystream | ||
└── readable-stream@2.0.5 | ||
``` | ||
@@ -72,5 +68,9 @@ | ||
### v1.0.0 | ||
- [#2](https://github.com/jpommerening/node-lazystream/pull/2): [unconditionally](https://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html) use `readable-stream` _2.x_. | ||
### v0.2.0 | ||
- [#1](github.com/jpommerening/node-lazystream/pull/1): error events are now propagated | ||
- [#1](https://github.com/jpommerening/node-lazystream/pull/1): error events are now propagated | ||
@@ -77,0 +77,0 @@ ### v0.1.0 |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
15739
12
268
+ Addedisarray@1.0.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
- Removedisarray@0.0.1(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedstring_decoder@0.10.31(transitive)
Updatedreadable-stream@^2.0.5