1.0.0 • Published 15 days ago

@rabiepenpm/amet-officia-quisquam v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

@rabiepenpm/amet-officia-quisquam 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('@rabiepenpm/amet-officia-quisquam');
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('@rabiepenpm/amet-officia-quisquam');
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('@rabiepenpm/amet-officia-quisquam');
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

watchingauthenticationfolderslotsharedarraybufferESnextoptimizerUint32ArrayES2016BigInt64ArraycallbindinferencetrimRight_.extenddeep-copyminimales-shim APIRxjestserializerArray.prototype.flatxssfindLastrandomfast-deep-copysetterCSSprune3dfastifyaccessorcore-jsFloat32Arrayomitscheme-validationbusyReflect.getPrototypeOfbrowserslistiterationtestingautoprefixercryptopolyfillappjson-schemacallboundinstallimmutablecomparedependenciesdependency managerpackagewritesignalsschemesymbolsstylingexpressconnectapolloargumentsloadingMapcryptlesswrapreduxless mixinsflagYAMLlockfilerm -rfinspectyupprivate dataopengroupanimationresolveECMAScript 6tslibfindes5persistentes2018toStringTagpropfindLastIndexreadablesearcherror-handlinges8l10ndefinesanitizationsetImmediateparentdiffflagstsprivatecss variableinputjoistatelessfetchvalidatorstartlrubyteLengthxhrhardlinksqsgetoptpackagesierm -frauthjQueryyamldeepclonecheckpostcsstyped arraystringvariablesidfast-deep-clonevestlanguagefind-upECMAScript 2021matchAllwaapiupquoteduplexfast-copyinvariantefficientwhichspinnerscurriedeventDispatcherWeakMapECMAScript 3boundworkervalidateextensioneslint-pluginmimetypesbyteOffsetstringifyAsyncIteratorjwtweaksetObject.entriesruntimestyled-componentsiteraterequestttyfunctionbrowserlistmrubabel-coreargsmapindicatorlogES2022toArraypackage managercreatebreakstreamdropbannerthrottlemixinsstructuredClonespinnervalidationnodekeysutiljsonpathpasswordcmdgradients css3concurrencyStyleSheetdebuggeruninstalllook-uplinewrapclassnametakechromiumcharactercomputed-typesutilsbddECMAScript 2018speedlookio-tsgetOwnPropertyDescriptorECMAScript 2016valuesArray.prototype.includesenderregexpURLawesomesaucematchHyBiarrayassertionrecursivesymlinkArray.prototype.filterECMAScript 2022sharedkeytddsetPrototypeOfES2018filtermime-dbredux-toolkitincludesirqfast-cloneoncecallbackexecutable[[Prototype]]processmergecss lessforEachwebbootstrap cssargumentjsonschemacallvariables in css$.extendfindupthroatflatcommandsignalbyteJSONfixed-widthString.prototype.trimformattingexevalidhttpformatcorscss-in-jsmovetoolkitponyfillFloat64ArrayratelimitES7256getprotocopytypestoobjectreact poseworkspace:*specfullwidthoffsetserializeentriesequalityframeworkequalclassnamessyntaxerrorpathtrimEndqueueMicrotaskregulartapeRxJSguiduser-streamspopmotionviewnamesloggingunicodeinternaleditorpreserve-symlinksdescriptortypedarraysexectesterprotocol-buffersremoveconcatdragObject.valuesartObject.assigndescriptorsstylesheetenumerableless.jshelpersIteratorString.prototype.matchAllpreprocessorgetintrinsictrimseturlstouchcontainstypeerrorcssdatastructureschematerminalformiteratorECMAScript 2017walkingES2020asynccolourfasttypedasciideepcopyextrafromcolumnsES2017StreamsStreamArrayBuffermobilejsdiffreact-hooksdatePusheslintArrayBuffer#slicehookformECMAScript 2020metadatabatch6to5apihasOwnes-abstractstartershimeast-asian-widthdeterministicmodulesvalueReactiveExtensionsstyleinstallertypesafeperformancemakeconcatMaplastencryptiontrimStarteslintpluginwordbreakjsxdebug__proto__sliceprotobufmkdirsweakmapexit-codecall-bindprogressintrinsiccompilerCSSStyleDeclarationObject.fromEntriesprettyvarES2021UnderscorereadablestreamarktypeArrayBuffer.prototype.sliceeveryreactfull-widthimmerinterruptsObservablestatusshrinkwraphooksmake dirnopecachedayjsidleansiObjectdeepbufferreal-timeimportstringifierairbnbestermsettingsdomlinuxtrimLeftes7xdg-openfileoptimistharmonyemojiSymbol.toStringTagObservablestc39i18nwritableflatMappromisesgradients cssfsmatchesthreesigtermdirectoryFunction.prototype.namefseventsbabelenvironmentRFC-6455gesturesargparseurlcharactersajvlengthpyyamldom-testing-libraryrangeerrordirxdggetPrototypeOfmkdirpcompile lesslistenerssymbolsomeECMAScript 2019Uint8ClampedArrayjapanesechromeutilitiesconsumeless compileremittaskTypeScriptoperating-systemmulti-packagedotenvmiddlewarepurewatchergroupByoptiones2015commanderes2016objectfunctionsdataViewreadchaicoretacitArray.prototype.findLastvisualpropertyprefixnested csssortedpipepatchaccessibilityoutputregexdescriptionless cssconstquerycollection.es6tappushasserteventEmitterECMAScript 7ajaxargvposeObject.definePropertyESenvbundlernamecodescoerciblecolorsECMAScript 2023bluebirdtraversesafesymlinkshigher-orderbcryptarraybufferUint8Arrayreusenumberextendestreeperformantramdasanitizemodulelazywalkrobustfantasy-landInt16ArraynpmdeleteWebSocketsspringcjktelephonehashclonecensorgdprtranspiler-0querystringrapidchildhasdefinePropertychinesesidepoint-freeparsejson-schema-validationmkdirclicommand-linechannelarrayssuperstructcolumnWebSockettextxtermwgetsyntaxtypescripta11yObject.keys.envzerogenericspromiseObject.isfigletInt8Arrayexpressionphoneassignformswatchclientinternal slotpackage.jsontypeletwarninguuidbindtoSortedrmdirflattenclassesqueuefputilityES2023stylesES6objreact-testing-librarypositiveregular expressionses2017form-validationsuperagentspawnjsonwordwrapES5limitastexitfile systemcollection
1.0.0

15 days ago