6.15.75 • Published 11 months ago

@hishprorg/earum-inventore v6.15.75

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months 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

11 months ago

6.15.74

11 months ago

6.15.73

11 months ago

6.15.72

11 months ago

6.15.71

11 months ago

6.15.70

11 months ago

6.15.69

11 months ago

6.15.68

11 months ago

6.15.67

11 months ago

6.15.66

11 months ago

6.15.65

11 months ago

6.15.64

11 months ago

6.15.63

11 months ago

6.14.63

11 months ago

6.14.62

11 months ago

6.14.61

11 months ago

6.14.60

11 months ago

6.14.59

11 months ago

6.14.58

11 months ago

6.14.57

11 months ago

6.14.56

11 months ago

6.14.55

11 months ago

6.14.54

11 months ago

6.14.53

12 months ago

6.14.52

12 months ago

6.13.52

12 months ago

6.13.51

12 months ago

6.13.50

12 months ago

6.12.50

12 months ago

6.11.50

12 months ago

6.11.49

12 months ago

6.11.48

12 months ago

6.11.47

12 months ago

6.11.46

12 months ago

6.11.45

12 months ago

6.10.45

12 months ago

6.10.44

12 months ago

6.9.44

12 months ago

6.8.44

12 months ago

6.7.44

12 months ago

6.7.43

12 months ago

6.7.42

12 months ago

6.7.41

12 months 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