/in-node

Checks if the program is running in node env.

Primary LanguageTypeScript

in-node

Build Status npm

Checks if the program is running in node env. Shipped with proper typings.

Index

Installation

npm:

npm i in-node --save

yarn:

yarn add in-node

Usage

import {inNode} from 'in-node'

if (isNode) {
  process.exit(1)
}