is-nodejs
v1.0.1
Published
Check if current js-runtime is node.js
Downloads
8
Maintainers
Readme
is-nodejs
Check if your current js-runtime is node.js.
Installation
yarn add is-nodejs
# or
npm install is-nodejs --save
Usage
CommonJS
const isNodejs = require('is-nodejs')
ES Module
import isNodejs from 'is-nodejs'
Implementation
function isNodejs () {
return typeof process !== 'undefined' && !!process.versions && !!process.versions.node
}