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

2 years ago

6.14.55

2 years ago

6.14.54

2 years ago

6.14.53

2 years ago

6.14.52

2 years ago

6.13.52

2 years ago

6.13.51

2 years ago

6.13.50

2 years ago

6.12.50

2 years ago

6.11.50

2 years ago

6.11.49

2 years ago

6.11.48

2 years ago

6.11.47

2 years ago

6.11.46

2 years ago

6.11.45

2 years ago

6.10.45

2 years ago

6.10.44

2 years ago

6.9.44

2 years ago

6.8.44

2 years ago

6.7.44

2 years ago

6.7.43

2 years ago

6.7.42

2 years ago

6.7.41

2 years ago

6.7.40

2 years ago

6.7.39

2 years ago

6.7.38

2 years ago

6.7.37

2 years ago

6.7.36

2 years ago

5.7.36

2 years ago

5.7.35

2 years ago

5.7.34

2 years ago

5.7.33

2 years ago

5.6.33

2 years ago

5.6.32

2 years ago

5.6.31

2 years ago

5.5.31

2 years ago

5.5.30

2 years ago

5.5.29

2 years ago

5.5.28

2 years ago

5.5.27

2 years ago

5.5.26

2 years ago

5.5.25

2 years ago

5.4.25

2 years ago

5.4.24

2 years ago

5.4.23

2 years ago

5.4.22

2 years ago

5.4.21

2 years ago

5.4.20

2 years ago

5.4.19

2 years ago

4.4.19

2 years ago

4.3.19

2 years ago

4.3.18

2 years ago

4.3.17

2 years ago

4.3.16

2 years ago

4.3.15

2 years ago

4.3.14

2 years ago

4.3.13

2 years ago

4.3.12

2 years ago

4.3.11

2 years ago

4.2.11

2 years ago

4.2.10

2 years ago

4.2.9

2 years ago

3.2.9

2 years ago

3.2.8

2 years ago

3.2.7

2 years ago

2.2.7

2 years ago

2.2.6

2 years ago

2.2.5

2 years ago

2.2.4

2 years ago

2.2.3

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago