Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

get-doc

dfcreative42.3kUnlicense1.0.4

Get document, if there’s DOM.

document, DOM, has-dom, node, browser, detect, environment, get-document

readme

get-doc

Return document, if there’s DOM. Just a way simpler than get-document. Use to avoid document is undefined error.

$ npm isntall get-doc

var doc = require('get-doc');

doc; //`document` in browser, `null` in node

NPM