Checks whether or not the current runtime environment is a browser.
MIT License
TypeScript module with type definition support by default. Also works with other JavaScript projects.
Checks whether or not the current runtime environment is a browser.
You want to check if a given condition needs to have browser support.
$ npm i is-browser-env
import isBrowserEnv from 'is-browser-env'
if (isBrowserEnv) {
// ...
}
is-browser-env © 2018 Cezar Augusto. Released under the MIT License.