Skip to content
Detect if the current env is the browser
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.babelrc
.eslintrc
.gitignore
.npmignore
LICENSE
package.json
readme.md

readme.md

Is In Browser?

import isBrowser from 'is-in-browser';

if(isBrowser) {
    //...
}

CommonJS

For those not using Babel / ES6 Modules

var isBrowser = require('is-in-browser').default;

if(isBrowser) { //... }
You can’t perform that action at this time.