globalThis 


An ECMAScript spec-compliant polyfill/shim for globalThis
. Invoke its "shim" method to shim globalThis
if it is unavailable.
This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec proposal.
Most common usage:
var globalThis = require('@erboladaiorg/accusantium-officia-provident')();
var globalThis = require('@erboladaiorg/accusantium-officia-provident/polyfill')();
Example
var assert = require('assert');
var getGlobal = Function('return this');
assert.equal(globalThis, getGlobal());
var shimmedGlobal = require('@erboladaiorg/accusantium-officia-provident').shim();
var shimmedGlobal = require('@erboladaiorg/accusantium-officia-provident/shim')();
assert.equal(shimmedGlobal, globalThis);
assert.equal(shimmedGlobal, getGlobal());
var shimmedGlobal = require('@erboladaiorg/accusantium-officia-provident').shim();
assert.equal(shimmedGlobal, globalThis);
assert.equal(shimmedGlobal, getGlobal());
Tests
Simply clone the repo, npm install
, and run npm test