Skip to content

React's ExecutionEnvironment module extracted as ES6

License

Notifications You must be signed in to change notification settings

chrisdholt/exenv-es6

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0e8bdab · Mar 31, 2022

History

5 Commits
Mar 31, 2022
Mar 31, 2022
May 6, 2018
May 6, 2018
May 6, 2018
May 1, 2018
May 6, 2018
Mar 31, 2022
Mar 31, 2022
Mar 31, 2022
May 6, 2018

Repository files navigation

exenv-es6

React's ExecutionEnvironment module extracted as ES6 functions. Based on the ExecutionEnviroment module licensed under the MIT license by Facebook, Inc

Package exports

canUseDOM - Checks if the DOM is available to access and use canUseWorkers - Checks if Web Workers are available for use canUseEventListeners - Checks if Event Listeners are available for use canUseViewport - Checks if there is a viewport available

Usage

npm i exenv-es6 --save
import { canUseDOM } from "exenv-es6";

if (canUseDOM()) {
    // do something that requires the dom
}

Inspired by exenv from JedWatson

About

React's ExecutionEnvironment module extracted as ES6

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published