Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 3.6.8 to 3.6.9

2

package.json
{
"name": "pull-stream",
"description": "minimal pull stream",
"version": "3.6.8",
"version": "3.6.9",
"homepage": "https://pull-stream.github.io",

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

@@ -45,2 +45,37 @@ var pull = require('../')

tape('abort async map (source is slow to ack abort)', function (t) {
var err = new Error('abort')
t.plan(3)
function source(end, cb) {
if (end) setTimeout(function () { cb(end) }, 20)
else cb(null, 10)
}
var read = pull(
source,
pull.asyncMap(function (data, cb) {
setImmediate(function () {
cb(null, data)
})
})
)
var ended = false
read(null, function (end) {
if(!end) throw new Error('expected read to end')
ended = true
t.ok(end, "read's callback")
})
read(err, function (end) {
if(!end) throw new Error('expected abort to end')
t.ok(end, "Abort's callback")
t.ok(ended, 'read called back first')
t.end()
})
})
tape('abort async map (async source)', function (t) {

@@ -108,3 +143,3 @@ var err = new Error('abort')

}
}, 100)
}, 100)
}),

@@ -119,1 +154,2 @@ pull.collect(function (err, five) {

@@ -36,3 +36,3 @@ 'use strict'

cb(aborted)
abortCb(aborted)
abortCb && abortCb(aborted)
}

@@ -39,0 +39,0 @@ else if(err) next (err, cb)

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