JSPM

@wessberg/globalobject

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q34525F
  • License MIT

A package that returns a reference to the global object, depending on the current execution environment.

Package Exports

  • @wessberg/globalobject

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@wessberg/globalobject) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GlobalObject NPM version

A package that returns a reference to the global object, depending on the current execution environment.

Installation

Simply do: npm install @wessberg/globalobject.

Usage

import {GlobalObject, GlobalObjectIdentifier} from "@wessberg/globalobect";
// GlobalObject refers to 'self', 'global' or 'window'.
// GlobalObjectIdentifier is the name of the identifier.

Changelog:

v1.0.3:

  • Other global objects will now be shimmed so that "window", "self", "root" or "global" always refers to the actual global object, no matter the context.

v1.0.2:

  • Added a GlobalObjectIdentifier which is the string name of the global object.

v1.0:

  • First release.