Socket
Book a DemoInstallSign in
Socket

suspendify

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

suspendify

Suspend resume state machine

latest
Source
npmnpm
Version
1.7.1
Version published
Maintainers
2
Created
Source

suspendify

Suspend/resume state machine with linger support. Made for mobile apps.

npm install suspendify

Usage

const Suspendify = require('suspendify')

const sus = new Suspendify({
  async pollLinger () { // optional
    return millisecondsLeftToLinger
  }
  async suspend () {
    // stop your engines
  },
  async resume () {
    // resume your engines
  }
})

// suspend but wait up to 30_000
sus.suspend(30_000)

// resume asap
sus.resume()

API

sus.suspend(time)

sus.resume()

sus.resuspend(time)

sus.resumedAt()

sus.suspendedAt()

sus.suspending

sus.suspended

sus.resuming

sus.resumed

License

Apache-2.0

FAQs

Package last updated on 14 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