1.0.0 • Published 7 years ago
@tiaanduplessis/cleanup v1.0.0
@tiaanduplessis/cleanup
Cleanup when process is terminated
Table of Contents
Install
This project uses node and npm.
$ npm install @tiaanduplessis/cleanup
$ # OR
$ yarn add @tiaanduplessis/cleanupUsage
const {cleanup} = require('@tiaanduplessis/cleanup')
const remove = cleanup((opts) => {
  console.log(opts) // { event: 'SIGINT' }
  session.close()
  driver.close()
}, {
  exit: true // call process.exit after handler
})
remove()// will remove handlerContribute
- Fork it and create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request
License
MIT
1.0.0
7 years ago