Comparing version 2.0.0 to 2.1.0
@@ -39,2 +39,6 @@ 'use strict'; | ||
} | ||
return () => { | ||
callbacks.delete(callback); | ||
}; | ||
}; |
{ | ||
"name": "exit-hook", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Run some code when the process exits", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -39,5 +39,15 @@ # exit-hook [![Build Status](https://travis-ci.org/sindresorhus/exit-hook.svg?branch=master)](https://travis-ci.org/sindresorhus/exit-hook) | ||
Removing an exit hook: | ||
```js | ||
const exitHook = require('exit-hook'); | ||
const unsubscribe = exitHook(() => {}); | ||
unsubscribe(); | ||
``` | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3620
34
53