0.1.1 • Published 8 years ago

global-undom v0.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
8 years ago

global-undom

Run browser-specific code in node using undom

This module shims the global document object in non-browser environments. Excludes the shim if required by a browser environment (using the browser field in package.json). This allows for easy testing without something heavy-weight like jsdom.

npm version dependency status license code style: standard

Installation

$ npm install global-undom

Example

const document = require('global-undom')
// e.g. document.createTextNode()

License

MIT