Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 349 Bytes

Readme.md

File metadata and controls

21 lines (15 loc) · 349 Bytes

Detect Is Node

You can use this module to detect if your code is running in the browser or on a Node.JS server.

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");
}