2.0.1 • Published 5 years ago

has-process v2.0.1

Weekly downloads
-
License
EUPL-1.2
Repository
-
Last release
5 years ago

has-process

Check if the Node.js process exists. Optionally ensures process has a given property, either generically (by comparing against undefined) or through a custom comparator.

Available as ES2015 and CommonJS modules.

Usage

import hasProcess from 'has-process';

// true if process and process.versions are defined
hasProcess();

// true if process and process.nextTick are defined
hasProcess('nextTick')

// true if process and process.nextTick are defined, and process.nextTick is a function
hasProcess((p: NodeJs.Process) => typeof p.nextTick === 'function')
2.0.1

5 years ago

2.0.0

5 years ago

1.1.0

8 years ago

1.0.0

8 years ago