# exenv-es6

> React's ExecutionEnvironment module recreated as ES6 functions

Latest version **1.1.1** (published 2022-03-31) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install exenv-es6
pnpm add exenv-es6
yarn add exenv-es6
bun add exenv-es6
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-03-31 |
| First published | 2018-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chris Holt |
| Maintainers | chrisdholt |
| Keywords | typescript, es6, react, browser, server, exenv, environment, env, execution, executionenvironment |

## Links

- npm: https://www.npmjs.com/package/exenv-es6
- Repository: https://github.com/chrisdholt/exenv-es6
- Homepage: https://github.com/chrisdholt/exenv-es6#readme
- Issues: https://github.com/chrisdholt/exenv-es6/issues
- npm.io page: https://npm.io/package/exenv-es6

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-03-31
- 1.1.0 — 2022-03-31
- 1.0.0 — 2018-05-06

## README

# 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
```

```js
import { canUseDOM } from "exenv-es6";

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

_Inspired by [exenv](https://github.com/JedWatson/exenv) from [JedWatson](https://github.com/JedWatson)_

---
_Source: https://npm.io/package/exenv-es6 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
