detect-is-node
v1.0.3
Published
check if running under node environment or browser
Readme
you can use this module to detect if your code is running on node server.
E.g. var isNode = require('detect-is-node');
install
npm install --save detect-is-node###Usage:
var isNode = require('detect-is-node');
if (isNode()) {
console.log("Running under node Environment");
} else {
console.log("Running in browser");
}