curtain-down

1.0.0 • Public • Published

curtain-down

Register functions to run when node exits with npm install curtain-down.

const curtain = require('curtain-down');
 
const applaud = console.log.bind(console, '👏 👏 👏');
const boo = console.log.bind(console, '🍅 🍅 🍅');
 
// Register functions to run when SIGTERM or SIGKILL are received:
curtain.on(applaud);  // every time;
curtain.once(boo);    // just once.
 
// You can also cancel…
curtain.off(boo);  // a particular function,
curtain.off();     // or all of them.

Readme

Keywords

Package Sidebar

Install

npm i curtain-down

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • elmigranto