1.0.1 • Published 4 years ago

@bemoje/is-node v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

@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.

Returns

boolean