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

exit-hook

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exit-hook - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

17

index.js
'use strict';
var cbs = [];
var called = false;
function exit(sig) {
function exit(exit, signal) {
if (called) {
return;
}
called = true;
cbs.forEach(function (el) {

@@ -10,4 +17,4 @@ el();

if (sig) {
process.exit(128);
if (exit === true) {
process.exit(128 + signal);
}

@@ -21,5 +28,5 @@ };

process.once('exit', exit);
process.once('SIGINT', exit.bind(null, true));
process.once('SIGTERM', exit.bind(null, true));
process.once('SIGINT', exit.bind(null, true, 2));
process.once('SIGTERM', exit.bind(null, true, 15));
}
};
{
"name": "exit-hook",
"version": "1.1.0",
"version": "1.1.1",
"description": "Run some code when the process exits",

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

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