|
|
há 3 anos | |
|---|---|---|
| .. | ||
| dist | há 3 anos | |
| src | há 3 anos | |
| test | há 3 anos | |
| .babelrc | há 3 anos | |
| .eslintrc | há 3 anos | |
| .npmignore | há 3 anos | |
| package.json | há 3 anos | |
| readme.md | há 3 anos | |
import isBrowser from 'is-in-browser';
if(isBrowser) {
//...
}
For those not using Babel / ES6 Modules
var isBrowser = require('is-in-browser').default;
if(isBrowser) { //... }