# get-doc

> Get document, if there’s DOM.

Latest version **1.0.4** (published 2017-07-24) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install get-doc
pnpm add get-doc
yarn add get-doc
bun add get-doc
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-07-24 |
| First published | 2015-01-25 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Deema Ywanov |
| Maintainers | dfcreative |
| Keywords | document, DOM, has-dom, node, browser, detect, environment, get-document |

## Links

- npm: https://www.npmjs.com/package/get-doc
- Repository: https://github.com/dfcreative/get-doc
- Issues: https://github.com/dfcreative/get-doc/issues
- npm.io page: https://npm.io/package/get-doc

## Dependencies (1)

- [has-dom](https://npm.io/package/has-dom.md) ~1.0.0

## 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.0.4 (latest) — 2017-07-24
- 1.0.3 — 2015-01-25
- 1.0.2 — 2015-01-25
- 1.0.1 — 2015-01-25
- 1.0.0 — 2015-01-25

## README

# get-doc

Return `document`, if there’s DOM. Just a way simpler than [get-document](https://github.com/webmodules/get-document). Use to avoid `document is undefined` error.

`$ npm isntall get-doc`

```js
var doc = require('get-doc');

doc; //`document` in browser, `null` in node
```

[![NPM](https://nodei.co/npm/get-doc.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/get-doc/)

<a href="UNLICENSE"><img src="http://upload.wikimedia.org/wikipedia/commons/6/62/PD-icon.svg" width="20"/></a>

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