Socket
Socket
Sign inDemoInstall

@jsenv/abort

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/abort - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

2

package.json
{
"name": "@jsenv/abort",
"version": "3.1.1",
"version": "3.1.2",
"description": "Help to write code compatible with abort signals",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -7,6 +7,5 @@ /*

let cleanCallbacks = []
let done = false
let status = "racing"
const cancel = () => {
done = true
const clean = () => {
cleanCallbacks.forEach((clean) => {

@@ -18,8 +17,18 @@ clean()

const cancel = () => {
if (status !== "racing") {
return
}
status = "cancelled"
clean()
}
Object.keys(raceDescription).forEach((candidateName) => {
const register = raceDescription[candidateName]
const returnValue = register((data) => {
if (done) return
done = true
cancel()
if (status !== "racing") {
return
}
status = "done"
clean()
winnerCallback({

@@ -26,0 +35,0 @@ name: candidateName,

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