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 4.0.0 to 4.1.0

2

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

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

@@ -16,2 +16,11 @@ /*

},
throwIfAborted: (signal) => {
if (signal.aborted) {
const error = new Error(`The operation was aborted`)
error.name = "AbortError"
error.type = "aborted"
throw error
}
},
}

@@ -46,8 +55,3 @@

const throwIfAborted = () => {
if (operationSignal.aborted) {
const error = new Error(`The operation was aborted`)
error.name = "AbortError"
error.type = "aborted"
throw error
}
Abort.throwIfAborted(operationSignal)
}

@@ -54,0 +58,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