UNPKG

is-node

Version:

Detect if current process is a node application or not.

9 lines (7 loc) 291 B
// Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md const $isNode = require('../'); if ($isNode) { console.log('This is a node process.'); } else { console.log('What kind of witchcraft is this? This is not a node process.'); }