linkedom-global
v1.0.0
Published
Make Node a browser-like environemnt, by using LinkeDOM.
Downloads
54
Maintainers
Readme
LinkeDOM Global
Make Node a browser-like environemnt, by using LinkeDOM.
Install
npm install --save linkedom-global
Usage
Simply importing it will register browser-like globals:
import 'linkedom-global'; // Register globals using 'linkedom'
// import 'linkedom-global/cached'; // Register globals using 'linkedom/cached'
// import 'linkedom-global/worker'; // Register globals using 'linkedom/worker'
console.log ( typeof globalThis.window ); // => 'object'
console.log ( typeof globalThis.document ); // => 'object'
console.log ( typeof globalThis.navigator ); // => 'object'
License
MIT © Fabio Spampinato