node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

composite-detect

Detect your environment: Node.js, Browser, and CommonJS.

compositejs/detect

Detect your environment: Node.js, Browser, and CommonJS.

Via component: $ component install compositejs/detect

Node.js: $ npm install composite-detect

Standalone: Download src/detect.js and look for the global detect object.

detect.isBrowser == true / false
detect.isNode == true / false
detect.isModule == true / false

MIT