Comparing version 1.3.0 to 2.0.0
@@ -23,7 +23,5 @@ var Readable = require('readable-stream').Readable | ||
} | ||
if (Array.isArray(read)) read = toFunction(read) | ||
var rs = new Proto(opts) | ||
rs._from = read | ||
rs._from = Array.isArray(read) ? toFunction(read) : read | ||
return rs | ||
@@ -30,0 +28,0 @@ } |
{ | ||
"name": "from2", | ||
"description": "Convenience wrapper for ReadableStream, with an API lifted from \"from\" and \"through2\"", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"main": "index.js", | ||
@@ -10,7 +10,7 @@ "scripts": { | ||
"dependencies": { | ||
"inherits": "~2.0.1", | ||
"readable-stream": "~1.1.10" | ||
"inherits": "^2.0.1", | ||
"readable-stream": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"tape": "~2.4.2" | ||
"tape": "^4.0.0" | ||
}, | ||
@@ -17,0 +17,0 @@ "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)", |
@@ -35,3 +35,3 @@ # from2 [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/from2&title=from2&description=hughsk/from2%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](http://github.com/hughsk/stability-badges) # | ||
// left in the string, close the stream. | ||
if (string.length <= 0) return this.push(null) | ||
if (string.length <= 0) return cb(null, null) | ||
@@ -38,0 +38,0 @@ // Pull in a new chunk of text, |
@@ -12,3 +12,3 @@ var test = require('tape') | ||
return from(function(size, next) { | ||
if (string.length <= 0) return next() | ||
if (string.length <= 0) return next(null, null) | ||
var chunk = string.slice(0, size) | ||
@@ -15,0 +15,0 @@ string = string.slice(size) |
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
7935
6
148
+ 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.1.14(transitive)
- Removedstring_decoder@0.10.31(transitive)
Updatedinherits@^2.0.1
Updatedreadable-stream@^2.0.0