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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.0172,153latest

Version History

VersionDownloads (Last 7 Days)Published
2.1.0172,153
2.0.13,150
2.0.01
1.0.03

Package Sidebar

Install

npm i is-browser

Weekly Downloads

40,021

Version

2.1.0

License

MIT

Unpacked Size

1.97 kB

Total Files

7

Last publish

Collaborators

  • forbeslindesay