@bemoje/is-node
v1.0.1
Published
Browser-safely returns whether the current process is a node-js process.
Downloads
14
Maintainers
Readme
@bemoje/is-node
Browser-safely returns whether the current process is a node-js process.
Version
Travis CI
Dependencies
Stats
Donate
Installation
npm install @bemoje/is-node
npm install --save @bemoje/is-node
npm install --save-dev @bemoje/is-node
Usage
import isNode from '@bemoje/is-node'
/**
* USE IN NODE ENVIRONMENT
*/
isNode()
//=> true
/**
* SAFELY USE IN BROWSER ENVIRONMENT
*/
isNode()
//=> false
Tests
Uses Jest to test module functionality. Run tests to get coverage details.
npm run test
API
isNode
Browser-safely returns whether the current process is a node-js process.