Socket
Socket
Sign inDemoInstall

pull-stream

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-stream - npm Package Compare versions

Comparing version 2.22.2 to 2.23.0

test/map.js

4

package.json
{
"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 @@ })

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