resource-on-exit
Register sync teardown handlers for a resource
Last updated a year ago by mafintosh .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install resource-on-exit 
SYNC missed versions from official npm registry.

resource-on-exit

Register sync teardown handlers for a resource

npm install resource-on-exit

Usage

const { add, remove } = require('resource-on-exit')

const file = { fd }

add(file, () => fs.closeSync(file.fd))
remove(file) // to remove

License

Apache-2.0

Current Tags

  • 1.0.0                                ...           latest (a year ago)

1 Versions

  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Total 7
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 1
Last Month 3
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE