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

@darkobits/adeiu

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@darkobits/adeiu - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

dist/adeiu.d.ts

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

# [0.2.0](https://github.com/darkobits/adeiu/compare/v0.1.0...v0.2.0) (2019-04-23)
### Features
* Callbacks may be registered with a custom list of signals. ([eba691b](https://github.com/darkobits/adeiu/commit/eba691b))
* Log errors thrown by callbacks to stderr. ([efd9576](https://github.com/darkobits/adeiu/commit/efd9576))
# 0.1.0 (2019-04-18)

@@ -7,0 +17,0 @@

15

package.json
{
"name": "@darkobits/adeiu",
"version": "0.1.0",
"version": "0.2.0",
"description": "Yet another POSIX signal handler.",

@@ -35,6 +35,9 @@ "license": "WTFPL",

],
"engines": {
"node": ">= 10.0.0"
},
"files": [
"dist"
],
"main": "dist/index.js",
"main": "dist/adeiu.js",
"scripts": {

@@ -46,7 +49,13 @@ "build": "nps build",

},
"dependencies": {
"chalk": "^2.4.2",
"ow": "^0.12.0"
},
"devDependencies": {
"@darkobits/ts-unified": "^1.3.0",
"@types/jest": "^24.0.11",
"@types/node": "^11.13.2"
"@types/node": "^11.13.2",
"emittery": "^0.4.1",
"p-wait-for": "^3.1.0"
}
}

@@ -7,2 +7,3 @@ <a href="#top" id="top">

<a href="https://travis-ci.org/darkobits/adeiu"><img src="https://img.shields.io/travis/darkobits/adeiu.svg?style=flat-square"></a>
<a href="https://www.codacy.com/app/darkobits/adeiu"><img src="https://img.shields.io/codacy/coverage/c18a33f1bf79468087b8a06ac8c645d2.svg?style=flat-square"></a>
<a href="https://david-dm.org/darkobits/adeiu"><img src="https://img.shields.io/david/darkobits/adeiu.svg?style=flat-square"></a>

@@ -45,1 +46,29 @@ <a href="https://github.com/conventional-changelog/standard-version"><img src="https://img.shields.io/badge/conventional%20commits-1.0.0-027dc6.svg?style=flat-square"></a>

```
## Advanced Usage
Usually, responding to signals dynamically can be accomplished by inspecting the `signal` argument passed to your callback. However, if it is important that listeners are _only_ installed on a particular signal, you may optionally provide a custom array of signals to assign a callback to.
```ts
import adeiu from '@darkobits/adeiu';
// Register callback that will only be invoked on SIGINT.
adeiu(() => {
// SIGINT cleanup tasks.
}, ['SIGINT']);
```
```ts
import adeiu, {SIGNALS} from '@darkobits/adeiu';
// Register callback with the default signals and SIGUSR1.
adeiu(() => {
// Custom cleanup tasks.
}, [...SIGNALS, 'SIGUSR1']);
```
## &nbsp;
<p align="center">
<br>
<img width="24" height="24" src="https://cloud.githubusercontent.com/assets/441546/25318539/db2f4cf2-2845-11e7-8e10-ef97d91cd538.png">
</p>
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