Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Test whether you're a component in browser or a package in npm
JavaScript
Branch: master
Failed to load latest commit information.
.npmignore Fix npmignore for browserify
LICENSE Add LICENSE
bower.json Add bower.json
client.js Release 1.0.0
component.json Release 2.0.1
package.json Release 2.0.1
readme.md Update readme for browserify
server.js Release 1.0.0

readme.md

is-browser

Test whether you're running on the server or in the browser (using browserify)

Installation

$ npm install is-browser

API

This simply exports true or false:

if (require('is-browser')) {
  console.log('The module was installed using component');
} else {
  console.log('The module was installed using npm');
}

License

MIT

Something went wrong with that request. Please try again.