is-browser
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i is-browser

Weekly Downloads

221,871

Version

2.1.0

License

MIT

Unpacked Size

1.97 kB

Total Files

7

Last publish

Collaborators

  • forbeslindesay