6.11.93 • Published 10 months ago

@diotoborg/libero-culpa-occaecati v6.11.93

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

@diotoborg/libero-culpa-occaecati 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('@diotoborg/libero-culpa-occaecati');
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('@diotoborg/libero-culpa-occaecati');
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('@diotoborg/libero-culpa-occaecati');
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

maptakebundlingcensortesterminimalpasswordECMAScript 2017signalredactquotefastcopyexecfilerangeerrorjsdomglobal objectes-abstractreact-componentString.prototype.matchAllJSONtelephonedynamodbvestinmoduleshookformstyleguidetc39globalThisyamlfast-copyendercore-js__proto__ECMAScript 2019Symbol.toStringTagwindowansiphoneECMAScript 3intrinsicredux-toolkitdescriptorsbrowserfunction.lengtherrorbuffertestinspectrulesRegExp#flagsStyleSheetfindLastIndexpyyamlglobal this valueloadingcloudformationcalloptimizerhasOwnsliceFunction.prototype.namecodesqueuees6toSortedjsonbootstrap lesseslintconfigviewSystem.global[[Prototype]]binariesownjapaneseES2023bannerreversedchannelESecmascriptstatecompilerpreserve-symlinkssortedshamlinkobjvarssetImmediatespinners$.extendrobustdiffieserializationcallbackspeedbyteOffsetdeepclonedir6to5deeprfc9562east-asian-widtharraylockfileruntimeReflect.getPrototypeOffunctionsreducetrimglacierreact-hook-formasterisksautoprefixercryptounicodecallbindprivatedataviewless compilertypedarrayiteratorperformantObject.valuestoReversedjson-schema-validationArray.prototype.filterECMAScript 2021bundlerwhichec2private dataconsoleObjectcss-in-jsString.prototype.trimTypeBoxpropertywindowserror-handlingl10nelmsignedinterruptschildforkreact poseprotobufjsdiffpersistentgroupBystringifyprototypeschemegetOwnPropertyDescriptorregexpreusePromiseECMAScript 5routemacosCSSStyleDeclarationstyletoolsJSON-SchemaemitshrinkwrapqueueMicrotaskentriesregular expressionutilitiescloudfrontinferencecommand-linesetPrototypeOfchecksnsWeakSetroute53electronshebangdeletetermauthhas-ownObject.entriesstylesheetfnmatchFloat64ArraycolourwgetexpressiondatefigleteventEmitterwritegenericsshimfixed-widthes2017endpointnodejsformattingbddenvironmentsjsonschemashellescaperfc4122globalsacorndom-testing-libraryfindArrayBuffer#sliceECMAScriptlinuxECMAScript 2018formschemacurriedstatelesssigtermHyBiajvfromimmutablebyteasynccomputed-typesdeterministicWebSocketUint32Arrayprotocol-bufferssetStreamWebSocketsapollofstypanionutilonceidentifiersbcryptelasticachepnpm9getPrototypeOfUint8ArraytoStringTagformssharedESnextmruestreees5vpcpostcss-pluginless.jscss variablejshintObject.fromEntriesglobdescriptionprettybabelremovereal-timearraybufferttysymlinkmkdir@@toStringTagSetjQuerypolyfillInt8Arraycolumnsparsingdropcall-boundjwtObject.isawesomesauceutil.inspectnodeoptiontrimStartpureurllessreaddeep-copygdprhandlersfunctionalstylesextraObject.getPrototypeOfReactiveExtensionsless mixinsbusyjoieslint-plugininstallercompile lessclass-validatorcliinputassertrapidcircularjson-schema-validatores2015importmetadataenvreducerES2018RegExp.prototype.flagsxhrbabel-coregradients cssgestureswalktrimEndrequestes7copyloggercoercibleuser-streamsRxJSsubprocessworkervalidatorcloudsearchpackagesfindLastsafeoffsetjavascriptES2015transportexeccommandsignalstypedhelpersbufferssettingsreactrandomslottrimRighttostringtag
5.11.93

10 months ago

6.11.93

10 months ago

5.11.92

10 months ago

5.11.91

10 months ago

5.11.90

10 months ago

5.11.89

10 months ago

5.11.88

10 months ago

5.11.87

10 months ago

5.11.86

10 months ago

5.11.85

10 months ago

5.11.84

10 months ago

5.10.84

10 months ago

5.10.83

10 months ago

5.10.82

10 months ago

5.10.81

10 months ago

5.10.80

10 months ago

5.10.79

10 months ago

5.10.78

10 months ago

5.10.77

10 months ago

5.10.76

10 months ago

5.10.75

10 months ago

5.10.74

11 months ago

5.10.73

11 months ago

5.10.72

11 months ago

5.10.71

11 months ago

5.10.70

11 months ago

5.10.69

11 months ago

5.10.68

11 months ago

5.10.67

11 months ago

5.10.66

11 months ago

5.10.65

11 months ago

5.10.64

11 months ago

5.10.63

11 months ago

5.10.62

11 months ago

5.10.61

11 months ago

5.10.60

11 months ago

5.9.60

11 months ago

5.9.59

11 months ago

5.9.58

11 months ago

5.9.57

11 months ago

5.9.56

11 months ago

5.9.55

11 months ago

5.9.54

11 months ago

5.9.53

11 months ago

5.9.52

11 months ago

4.9.52

11 months ago

4.8.52

11 months ago

4.8.51

11 months ago

4.8.50

11 months ago

4.8.49

11 months ago

4.8.48

11 months ago

4.8.47

12 months ago

4.8.46

12 months ago

4.8.45

12 months ago

4.8.44

12 months ago

4.8.43

12 months ago

4.8.42

12 months ago

4.8.41

12 months ago

4.8.40

12 months ago

4.7.40

12 months ago

4.7.39

12 months ago

4.7.38

12 months ago

4.7.37

12 months ago

4.7.36

12 months ago

4.6.36

12 months ago

4.6.35

12 months ago

3.6.35

12 months ago

3.6.34

12 months ago

3.6.33

12 months ago

3.6.32

12 months ago

3.6.31

12 months ago

3.6.30

1 year ago

3.6.29

1 year ago

3.6.28

1 year ago

3.6.27

1 year ago

3.6.26

1 year ago

3.6.25

1 year ago

3.6.24

1 year ago

2.6.24

1 year ago

2.6.23

1 year ago

2.6.22

1 year ago

2.6.21

1 year ago

2.6.20

1 year ago

2.6.19

1 year ago

2.6.18

1 year ago

2.6.17

1 year ago

2.6.16

1 year ago

2.6.15

1 year ago

2.6.14

1 year ago

2.6.13

1 year ago

2.5.13

1 year ago

2.5.12

1 year ago

2.4.12

1 year ago

2.4.11

1 year ago

2.4.10

1 year ago

2.3.10

1 year ago

2.3.9

1 year ago

2.3.8

1 year ago

2.3.7

1 year ago

1.3.7

1 year ago

1.3.6

1 year ago

1.2.6

1 year ago

1.1.6

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