Socket
Book a DemoInstallSign in
Socket

resource-on-exit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resource-on-exit

Register sync teardown handlers for a resource

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 08 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts