is-browser
Test whether you're a component in browser or a package in npm
Last updated a year ago by forbeslindesay .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a year ago)

4 Versions

  • 2.1.0                                ...           a year ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           7 years ago
  • 1.0.0                                ...           7 years ago

Copyright 2014 - 2016 © taobao.org |