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

inflight

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inflight - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

34

inflight.js

@@ -22,15 +22,25 @@ var wrappy = require('wrappy')

var args = slice(arguments)
for (var i = 0; i < len; i++) {
cbs[i].apply(null, args)
// XXX It's somewhat ambiguous whether a new callback added in this
// pass should be queued for later execution if something in the
// list of callbacks throws, or if it should just be discarded.
// However, it's such an edge case that it hardly matters, and either
// choice is likely as surprising as the other.
// As it happens, we do go ahead and schedule it for later execution.
try {
for (var i = 0; i < len; i++) {
cbs[i].apply(null, args)
}
} finally {
if (cbs.length > len) {
// added more in the interim.
// de-zalgo, just in case, but don't call again.
cbs.splice(0, len)
process.nextTick(function () {
RES.apply(null, args)
})
} else {
delete reqs[key]
}
}
if (cbs.length > len) {
// added more in the interim.
// de-zalgo, just in case, but don't call again.
cbs.splice(0, len)
process.nextTick(function () {
RES.apply(null, args)
})
} else {
delete reqs[key]
}
})

@@ -37,0 +47,0 @@ }

{
"name": "inflight",
"version": "1.0.5",
"version": "1.0.6",
"description": "Add callbacks to requests in flight to avoid async duplication",

@@ -14,6 +14,6 @@ "main": "inflight.js",

"devDependencies": {
"tap": "^1.2.0"
"tap": "^7.1.2"
},
"scripts": {
"test": "tap test.js"
"test": "tap test.js --100"
},

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

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