is-browser
Test whether you're a component in browser or a package in npm
Last updated 6 years ago by forbeslindesay .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-browser 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.1.0                                ...           latest (6 years ago)

4 Versions

  • 2.1.0                                ...           6 years ago
  • 2.0.1                                ...           10 years ago
  • 2.0.0                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |