$ npm install is-browser
Test whether you're running on the server or in the browser (using browserify)
$ npm install is-browser
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');
}
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE