2.7.101 • Published 12 months ago

@erboladaiorg/rerum-cum v2.7.101

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

globalThis Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

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/rerum-cum')(); // returns native globalThis if compliant
	/* or */
var globalThis = require('@erboladaiorg/rerum-cum/polyfill')(); // returns native globalThis if compliant

Example

var assert = require('assert');

// the below function is not CSP-compliant, but reliably gets the
// global object in sloppy mode in every engine.
var getGlobal = Function('return this');

assert.equal(globalThis, getGlobal());
/* when `globalThis` is not present */
var shimmedGlobal = require('@erboladaiorg/rerum-cum').shim();
	/* or */
var shimmedGlobal = require('@erboladaiorg/rerum-cum/shim')();

assert.equal(shimmedGlobal, globalThis);
assert.equal(shimmedGlobal, getGlobal());
/* when `globalThis` is present */
var shimmedGlobal = require('@erboladaiorg/rerum-cum').shim();

assert.equal(shimmedGlobal, globalThis);
assert.equal(shimmedGlobal, getGlobal());

Tests

Simply clone the repo, npm install, and run npm test

.envcode pointsexecnpmignoreCSSStyleDeclarationasteriskstoSortedTypeScripthas-ownjsdomjsinputignoreimmutableautoprefixerbundlerreduxECMAScript 5[[Prototype]]momentpositivesymlinksbyteeveryespreemoduleawstypedarrayprettygdpra11yTypedArrayObject.definePropertydayjsdebuggertraversekinesisobjectcensorES3iamqsentriescomputed-types-0Int16ArraymetadataES8matchesStreamhelpernodejsECMAScript 2022listenersSystem.globalmochaArray.prototype.findLastconsoleglobalThissortedeast-asian-widthistanbulajvcompareextrasimpledbTypeBox256pinozodmakewindowassertsuser-streamsdataoncebabeles6endpointxmlindicatorprefixes2015fnmatchgraphqlzerocheckarrayes8eventDispatchercoercibledynamodbglobal objectcodesrmebseffect-tstouchES2017shareddeepcopyoffsetobjeventsarraysiteratesqsupreduceaccessortestingclientcolumnsbannerstoragegatewayreadablestreamcharacterwhichelbreactES2016searchnodemonoreposuperstructReflect.getPrototypeOfcloudtrailObservablesdeepforkbeanstalkSetagentreal-timeelasticacheECMAScript 2016getintrinsicschemeecmascriptglobownpackage.jsontapecopybufferswaitthreepureinferencechildtransformincludescssfixed-widthconst$.extendconfigurabletrimObject.valueseslint-pluginECMAScript 3routeidentifierslocalsomedependency manageravagetterroutinginstallernumberECMAScript 2023classnameargumenttoobjecttslibvalidationfind-upES2023curlbrowserslistObservablenegative zerochromiumES2019picomatchemrrmdirconfigtyped arrayimmerrestfulexpressionsubprocessshelldeep-copyparserFloat32ArrayflatweaksetautoscalingkeysliceSymbolvarslocationArray.prototype.includesES2022global this valueswfregular expressionforEachCSStoStringTagminimalaccessibilityclass-validatorbindvaluestreamweakmapArrayUnderscorestringjsonschematypanionflatMaplibphonenumberiddefineInt32ArrayESnexttransportcall-bindajaxpromisestringifierECMAScript 2021css-in-jstranspilefetchcloudformationhttpsglobalponyfillObject.assignvalidatecommanderroutercloudsearchpackagesphonetelephonetypesafehashObject.entriespostcsstostringtagkarmaenvironmentsetPrototypeOfcacheastmruposeprotocol-buffersparsecloudwatchapollopreprocessordependencieskoreaneslintconfigES7cloneansiObject.keysgetoptpolyfillequalfastclonetypescriptlanguageunicodedateArray.prototype.flattencollectionpackage managerjasmineStyleSheetReactiveExtensionsqueuei18nMapcallboundformatrm -rfimportexportcolorstypederrorutilitiesbyteLengthboundUint8ArraySymbol.toStringTagpostcss-pluginpackagecircularglacierdragbundlingidledom-testing-libraryvpc
2.7.101

12 months ago

2.7.100

12 months ago

2.7.99

12 months ago

2.7.98

12 months ago

2.6.98

12 months ago

2.6.97

12 months ago

2.6.96

1 year ago

2.6.95

1 year ago

2.6.94

1 year ago

2.6.93

1 year ago

2.6.92

1 year ago

2.6.91

1 year ago

2.6.90

1 year ago

2.6.89

1 year ago

2.6.88

1 year ago

2.6.87

1 year ago

2.6.86

1 year ago

2.6.85

1 year ago

2.6.84

1 year ago

2.6.83

1 year ago

2.6.82

1 year ago

2.6.81

1 year ago

2.6.80

1 year ago

2.6.79

1 year ago

2.6.78

1 year ago

2.6.77

1 year ago

2.6.76

1 year ago

2.6.75

1 year ago

2.6.74

1 year ago

2.6.73

1 year ago

2.6.72

1 year ago

2.6.71

1 year ago

2.6.70

1 year ago

2.6.69

1 year ago

2.6.68

1 year ago

2.6.67

1 year ago

2.6.66

1 year ago

2.6.65

1 year ago

2.6.64

1 year ago

2.5.64

1 year ago

2.5.63

1 year ago

2.5.62

1 year ago

2.5.61

1 year ago

2.5.60

1 year ago

2.5.59

1 year ago

2.5.58

1 year ago

2.5.57

1 year ago

2.5.56

1 year ago

2.5.55

1 year ago

2.5.54

1 year ago

2.5.53

1 year ago

2.5.52

1 year ago

2.5.51

1 year ago

2.5.50

1 year ago

2.5.49

1 year ago

2.5.48

1 year ago

2.4.48

1 year ago

2.4.47

1 year ago

2.4.46

1 year ago

2.4.45

1 year ago

2.4.44

1 year ago

2.4.43

1 year ago

2.4.42

1 year ago

2.4.41

1 year ago

2.4.40

1 year ago

1.4.40

1 year ago

1.3.40

1 year ago

1.3.39

1 year ago

1.3.38

1 year ago

1.3.37

1 year ago

1.3.36

1 year ago

1.3.35

1 year ago

1.3.34

1 year ago

1.3.33

1 year ago

1.2.33

1 year ago

1.2.32

1 year ago

1.2.31

1 year ago

1.2.30

1 year ago

1.2.29

1 year ago

1.2.28

1 year ago

1.2.27

1 year ago

1.2.26

1 year ago

1.2.25

1 year ago

1.2.24

1 year ago

1.2.23

1 year ago

1.2.22

1 year ago

1.2.21

1 year ago

1.2.20

1 year ago

1.2.19

1 year ago

1.2.18

1 year ago

1.2.17

1 year ago

1.2.16

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago