A package that returns a reference to the global object, depending on the current execution environment.
npm install @wessberg/globalobject[dev-dependencies-url]: https://david-dm.org/wessberg/typedetector?type=dev
[dev-dependencies-image]: https://david-dm.org/hub.com/wessberg/globalobject/dev-status.svg
[![deps][deps-image]][deps-url]
[deps-url]: https://david-dm.org/wessberg/typedetector
[deps-image]: https://david-dm.org/hub.com/wessberg/globalobject/status.svg
[![License-mit][license-mit-image]][license-mit-url]
[license-mit-url]: https://opensource.org/licenses/MIT
[license-mit-image]: https://img.shields.io/badge/License-MIT-yellow.svg
> A package that shims and returns a reference to the global object, depending on the current execution environment.
npm install @wessberg/globalobject.``typescript``
import {GlobalObject, GlobalObjectIdentifier} from "@wessberg/globalobect";
// GlobalObject refers to 'self', 'global' or 'window'.
// GlobalObjectIdentifier is the name of the identifier.
* 1.0.7 (c9a80af)
* Bumped version (35450e9)
* - Migrated to common ts-config configuration. (7750b56)
* 1.0.6 (a90e4fc)
* Update .gitignore (12262a6)
* Update package.json (db4d697)
* 1.0.5 (73a0d6b)
* Added a new exported property: 'shimGlobalObjectStringified' which is a stringified shim that can be (396aed5)
* 1.0.4 (0098610)
* Added a new function that this module exports: . Calling this from anywhere will shim the window, se (29ae227)
* 1.0.3 (fd0ef1a)
* Other global objects will now be shimmed so that window, self, root or global always refers to the a (da5a2c9)
* 1.0.2 (bd0d25a)
* Added a which is the string name of the global object. (65b1dc0)
* 1.0.1 (4171316)
* First commit (37aaf16)
* Fixed the package name in the README (4ad722a)
* Fixed version (cacbdd0)
* - Migrated to common ts-config configuration. (7750b56)
* 1.0.6 (a90e4fc)
* 1.0.5 (73a0d6b)
* Added a new exported property: 'shimGlobalObjectStringified' which is a stringified shim that can be (396aed5)
* 1.0.4 (0098610)
* Added a new function that this module exports: . Calling this from anywhere will shim the window, se (29ae227)
* 1.0.3 (fd0ef1a)
* Other global objects will now be shimmed so that window, self, root or global always refers to the a (da5a2c9)
* 1.0.2 (bd0d25a)
* Added a which is the string name of the global object. (65b1dc0)
* 1.0.1 (4171316)
* First commit (37aaf16)
* Fixed the package name in the README (4ad722a)
* Fixed version (cacbdd0)