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.4.0 to 2.5.0

test/async-map.js

5

docs/throughs.md

@@ -39,2 +39,7 @@ # Throughs

## asyncMap (fun)
like `map` but the signature of `fun` must be
`function (data, cb) { cb(null, data) }`
## filter (test)

@@ -41,0 +46,0 @@

2

package.json
{
"name": "pull-stream",
"description": "minimal pull stream",
"version": "2.4.0",
"version": "2.5.0",
"homepage": "https://github.com/dominictarr/pull-stream",

@@ -6,0 +6,0 @@ "repository": {

@@ -11,7 +11,10 @@ var pull = require('../')

read(null, function (end, data) {
if(!end) t.deepEqual(data, [
[0, 1,2,3,4,5,6],
[7,8,9,10,11,12,13],
[14, 15,16,17,18,19]
])
if(!end) {
t.deepEqual(data, [
[0, 1,2,3,4,5,6],
[7,8,9,10,11,12,13],
[14, 15,16,17,18,19]
])
console.log(data)
}
process.nextTick(cb.bind(null, end, data))

@@ -18,0 +21,0 @@ })

@@ -26,2 +26,14 @@ function prop (map) {

var asyncMap = exports.asyncMap =
function (read, map) {
if(!map) return read
return function (end, cb) {
if(end) return read(end, cb) //abort
read(null, function (end, data) {
if(end) return cb(end, data)
map(data, cb)
})
}
}
var filter = exports.filter =

@@ -28,0 +40,0 @@ function (read, test) {

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