6.15.75 • Published 1 year ago

@hishprorg/earum-inventore v6.15.75

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@hishprorg/earum-inventore Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2015 mostly-spec-compliant Reflect.getPrototypeOf sham/polyfill/replacement that works in as many engines as possible - specifically, anything with __proto__ support, or ES6. Built-in types will also work correctly in older engines.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Example

var getPrototypeOf = require('@hishprorg/earum-inventore');
var assert = require('assert');

assert.throws(() => getPrototypeOf(true));
assert.throws(() => getPrototypeOf(42));
assert.throws(() => getPrototypeOf(''));
assert.equal(getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(getPrototypeOf(new Date()), Date.prototype);
assert.equal(getPrototypeOf(function () {}), Function.prototype);
assert.equal(getPrototypeOf([]), Array.prototype);
assert.equal(getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@hishprorg/earum-inventore');
var assert = require('assert');
/* when Reflect or Reflect.getPrototypeOf is not present */
if (typeof Reflect === 'object') { delete Reflect.getPrototypeOf; }
delete globalThis.Reflect;
var shimmed = getPrototypeOf.shim();
assert.equal(shimmed, getPrototypeOf.getPolyfill());

assert.throws(() => Reflect.getPrototypeOf(true));
assert.throws(() => Reflect.getPrototypeOf(42));
assert.throws(() => Reflect.getPrototypeOf(''));
assert.equal(Reflect.getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(Reflect.getPrototypeOf(new Date()), Date.prototype);
assert.equal(Reflect.getPrototypeOf(function () {}), Function.prototype);
assert.equal(Reflect.getPrototypeOf([]), Array.prototype);
assert.equal(Reflect.getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@hishprorg/earum-inventore');
var assert = require('assert');
/* when Reflect.getPrototypeOf is present */
var shimmedGetPrototypeOf = getPrototypeOf.shim();
assert.equal(shimmedGetPrototypeOf, Reflect.getPrototypeOf);
assert.equal(Reflect.getPrototypeOf([]), Array.prototype);

Tests

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

yamlarrayobjecttoolkitclassesemrmobileignoreBigUint64ArrayvpcenvspinnersapitapnegativeelbtypesameValueZerohasOwnPropertysafeparentFloat32Arrayprivateapollofast-deep-copysharedarraybuffercore-jsserializerforktoStringTagtsjshintsideharmonyonceproxycss-in-jsArrayBufferes2017dotenvclassnameECMAScript 3keysObjectlistenersObject.fromEntriesArray.prototype.findLastIndexlintString.prototype.trimUnderscorestringAsyncIterator_.extendfast-deep-clonehookformjavascriptreworkisConcatSpreadableJSON-SchemapushworkerwaapisimpledbmakeString.prototype.matchAllbrowserlistreact-hook-formgroupByreusesharedMicrosoftfullrfc4122ESES6queryremovemruscheme-validationlockfileFunction.prototype.namequoteiteratormanipulationwgetkinesisclassnamesbundlerdependenciesWeakSetfast-clonermglobalsreverseerrorjasmineidswflook-upsymbolshelpersrmdirmatchAllsomexmljsflagbrowsercryptoastarraysanimationlocationcodesinputObject.valuesnegative zerobddemojistoragegatewaydeepcopygetterJSONUint8Array6to5immertypesafekeytddajvprettyqueueMicrotaskgenericsexpressionoptimizeres6everyvaluelengtheslintECMAScriptinvariantwafbufferschromiumprivate databusyglacierpicomatchmapreduceidlehtmles-abstractdeleteReactiveXglobal this valueReactiveExtensionsspawnsymbolargsdeep-copyES2017deterministicvareventDispatchercall-boundperformancefindregularstylewhatwgcollection.es6Rxlanguagedependency managertoArrayconcatfunction.lengthstreamwriteRFC-6455snscloudsearchbinaryextraroutingECMAScript 2020channelTypeBoxloggerjson-schemawait0numbercoverageconsumepopmotiondefinePropertyassertregular-expressioncircularlocalmomentspeedqueueinferencehooksvisualidentifiersparsethreeECMAScript 2022inspectcharacterECMAScript 2016restfulasyncartcallbacktypedarraypipeenvironmentsfunctionsArray.prototype.flattenelectronpoint-freeURLSearchParamstoolsdebuguuidoptionjsdiffdropES2021cloudwatchzerodiffloadingslicespinnerchinesejQuerycloudtrailrapidspringlruCSSStyleDeclarationpreprocessorsyntaxerrortacitesflatcolourloggingES8reduceoffsetrdsexecfilefixed-widthbufferchairoute53slotimportexportdescriptorschemeincludespathl10nreact poseES2023flatMap[[Prototype]]shrinkwrapshamcharactersstylingregular expressionacornframework__proto__trimLeftruntimecallboundimmutablemkdirpconfiggetintrinsicWebSocketsautoscalingmatchArray.prototype.includesstyled-componentsframercloudformationtslibemitargumentrandomes-shim APIgitignoreajaxstylespackagerangeerrorCSSregexpa11yformswalkObject.definePropertyredacttrimRightpnpm9Object.keysclass-validatorhashavaTypeScriptreversedramdawidthatomownsesdragqsequalityxtermglobalThispolyfill
6.15.75

1 year ago

6.15.74

1 year ago

6.15.73

1 year ago

6.15.72

1 year ago

6.15.71

1 year ago

6.15.70

1 year ago

6.15.69

1 year ago

6.15.68

1 year ago

6.15.67

1 year ago

6.15.66

1 year ago

6.15.65

1 year ago

6.15.64

1 year ago

6.15.63

1 year ago

6.14.63

1 year ago

6.14.62

1 year ago

6.14.61

1 year ago

6.14.60

1 year ago

6.14.59

1 year ago

6.14.58

1 year ago

6.14.57

1 year ago

6.14.56

1 year ago

6.14.55

1 year ago

6.14.54

1 year ago

6.14.53

1 year ago

6.14.52

1 year ago

6.13.52

1 year ago

6.13.51

1 year ago

6.13.50

1 year ago

6.12.50

1 year ago

6.11.50

1 year ago

6.11.49

1 year ago

6.11.48

1 year ago

6.11.47

1 year ago

6.11.46

1 year ago

6.11.45

1 year ago

6.10.45

1 year ago

6.10.44

1 year ago

6.9.44

1 year ago

6.8.44

1 year ago

6.7.44

1 year ago

6.7.43

1 year ago

6.7.42

1 year ago

6.7.41

1 year ago

6.7.40

1 year ago

6.7.39

1 year ago

6.7.38

1 year ago

6.7.37

1 year ago

6.7.36

1 year ago

5.7.36

1 year ago

5.7.35

1 year ago

5.7.34

1 year ago

5.7.33

1 year ago

5.6.33

1 year ago

5.6.32

1 year ago

5.6.31

1 year ago

5.5.31

1 year ago

5.5.30

1 year ago

5.5.29

1 year ago

5.5.28

1 year ago

5.5.27

1 year ago

5.5.26

1 year ago

5.5.25

1 year ago

5.4.25

1 year ago

5.4.24

1 year ago

5.4.23

1 year ago

5.4.22

1 year ago

5.4.21

1 year ago

5.4.20

1 year ago

5.4.19

1 year ago

4.4.19

1 year ago

4.3.19

1 year ago

4.3.18

1 year ago

4.3.17

1 year ago

4.3.16

1 year ago

4.3.15

1 year ago

4.3.14

1 year ago

4.3.13

1 year ago

4.3.12

1 year ago

4.3.11

1 year ago

4.2.11

1 year ago

4.2.10

1 year ago

4.2.9

1 year ago

3.2.9

1 year ago

3.2.8

1 year ago

3.2.7

1 year ago

2.2.7

1 year ago

2.2.6

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.3

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago