Checks if the program is running in node env.
npm install in-node
!npm
Checks if the program is running in node env. Shipped with proper typings.
- Installation
- Usage
- Documentation
npm:
``bash`
npm i in-node --save
yarn:
`bash`
yarn add in-node
`ts
import {inNode} from 'in-node'
if (isNode) {
process.exit(1)
}
``