npm.io
2.1.0 • Published 7 years ago

is-browser

Licence
MIT
Version
2.1.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0
Stars
28

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