Cleanup when process is terminated
This project uses node and npm.
$ npm install @tiaanduplessis/cleanup
$ # OR
$ yarn add @tiaanduplessis/cleanup
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 handler
- 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
MIT