Skip to content

Test whether you're a component in browser or a package in npm

License

Notifications You must be signed in to change notification settings

HenrikJoreteg/is-browser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Test whether you're a component in browser or a package in npm

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%