LogoPear Docs

bare-process

Node.js-compatible process control for Bare

stable

bare-process — Node.js-compatible process control for Bare.

Mirrors the Node.js process module.

npm i bare-process

Usage

const process = require('bare-process')

process.exit()

To make the process object globally available, do:

require('bare-process/global')

API

Types

ProcessEvents

interface ProcessEvents extends EventMap {
  beforeExit: [code: number]
  exit: [code: number]
  idle: []
  resume: []
  suspend: [linger: number]
  uncaughtException: [err: unknown]
  unhandledRejection: [reason: unknown, promise: Promise<unknown>]

  SIGBREAK: []
  SIGHUP: []
  SIGINT: []
  SIGPIPE: []
  SIGTERM: []
  SIGWINCH: []
}
Source

Events emitted by process.

bare-process/global

Types

Process

type Process = typeof process
Source

Alias for the type of the global process object.

See also

On this page