is-browser

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

MIT 4 个版本
安装
npm install is-browser
yarn add is-browser
pnpm add is-browser
bun add is-browser
README

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

版本列表
2.1.0 2018-09-11
2.0.1 2014-07-25
2.0.0 2013-02-23
1.0.0 2012-12-23