
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
suspend-resource
Advanced tools
Ready resource with resume/suspend functionality.
npm install suspend-resource
const SuspendResource = require('suspend-resource')
class Thing extends SuspendResource {
constructor () {
super()
}
async _open () {
// open the resource
}
async _close () {
// close the resource
}
async _suspend() {
// suspend the resource (only implement if suspend/resume is required)
}
async _resume_() {
// resume the resource (only implement if suspend/resume is required)
}
}
const r = new Thing()
await r.ready() // calls _open once
await r.ready() // noop
await r.suspend() // calls _suspend once
await r.suspend() // noop
await r.resume() // calls _resume once
await r.resume() // noop
await Promise.all([r.suspend(), r.resume()]) // ends up resumed, since resume is the last method to be called
await r.close()
FAQs
Ready resource with suspend/resume support
The npm package suspend-resource receives a total of 4,654 weekly downloads. As such, suspend-resource popularity was classified as popular.
We found that suspend-resource demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.