pull-stream
Advanced tools
Comparing version 2.22.2 to 2.23.0
{ | ||
"name": "pull-stream", | ||
"description": "minimal pull stream", | ||
"version": "2.22.2", | ||
"version": "2.23.0", | ||
"homepage": "https://github.com/dominictarr/pull-stream", | ||
@@ -14,3 +14,3 @@ "repository": { | ||
"devDependencies": { | ||
"tape": "~1.0.0" | ||
"tape": "~2.12.3" | ||
}, | ||
@@ -17,0 +17,0 @@ "scripts": { |
@@ -31,2 +31,10 @@ # pull-stream | ||
## Compatibily with node streams | ||
pull-streams are not _directly_ compatible with node streams, | ||
but pull-streams can be converted into node streams with | ||
[pull-stream-to-stream](https://github.com/dominictarr/pull-stream-to-stream) | ||
and node streams can be converted into pull-stream using [stream-to-pull-stream](https://github.com/dominictarr/stream-to-pull-stream) | ||
## Examples | ||
@@ -38,3 +46,3 @@ | ||
`pull.{Source,Through,Sink}` just wrap a function and give it a `.pipe(dest)`! | ||
`pull.{Source,Through,Sink}` wraps a function and added a `type` property to signify what type of pull-stream it is. | ||
@@ -41,0 +49,0 @@ ```js |
@@ -12,5 +12,11 @@ var u = require('pull-core') | ||
map = prop(map) || id | ||
return function (end, cb) { | ||
read(end, function (end, data) { | ||
var data = !end ? map(data) : null | ||
return function (abort, cb) { | ||
read(abort, function (end, data) { | ||
try { | ||
data = !end ? map(data) : null | ||
} catch (err) { | ||
return read(err, function () { | ||
return cb(err) | ||
}) | ||
} | ||
cb(end, data) | ||
@@ -17,0 +23,0 @@ }) |
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
46410
32
1285
267