mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-28 03:15:16 +00:00
20 lines
232 B
Markdown
20 lines
232 B
Markdown
# 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) { //... }
|
|
```
|