1.0.0 • Published 1 year ago

@f1stnpm2/dolores-accusamus-impedit v1.0.0

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

@f1stnpm2/dolores-accusamus-impedit Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES5 mostly-spec-compliant Object.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('@f1stnpm2/dolores-accusamus-impedit');
var assert = require('assert');

assert.equal(getPrototypeOf(true), Boolean.prototype);
assert.equal(getPrototypeOf(42), Number.prototype);
assert.equal(getPrototypeOf(''), String.prototype);
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('@f1stnpm2/dolores-accusamus-impedit');
var assert = require('assert');
/* when Object.getPrototypeOf is not present */
delete Object.getPrototypeOf;
var shimmed = getPrototypeOf.shim();
assert.equal(shimmed, getPrototypeOf.getPolyfill());

assert.equal(Object.getPrototypeOf(true), Boolean.prototype);
assert.equal(Object.getPrototypeOf(42), Number.prototype);
assert.equal(Object.getPrototypeOf(''), String.prototype);
assert.equal(Object.getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(Object.getPrototypeOf(new Date()), Date.prototype);
assert.equal(Object.getPrototypeOf(function () {}), Function.prototype);
assert.equal(Object.getPrototypeOf([]), Array.prototype);
assert.equal(Object.getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@f1stnpm2/dolores-accusamus-impedit');
var assert = require('assert');
/* when Object.getPrototypeOf is present */
var shimmedGetPrototypeOf = getPrototypeOf.shim();
assert.equal(shimmedGetPrototypeOf, Object.getPrototypeOf);
assert.equal(Object.getPrototypeOf([]), Array.prototype);

Tests

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

busyflagsCSSStyleDeclarationWebSocketjsonpathECMAScript 7pathrecursiveInt8Arraymake direxpressionstylessafefetchstreameventDispatcheruninstallindicatorES2018ES2023processObject.valuesRegExp.prototype.flagsES-0Observablefind-upURLconnectbluebirdrfc4122dataViewexpresstimeinsyntaxerrorstringifiernodejscorsfseventstypeObject.definePropertyweakmaptypeofutil.inspectmatchesES2020workflowObject.keysgroupByless mixinsfsString.prototype.matchAllwritecollection.es6regular expressionpnpm9reduxconsolees-shimsECMAScript 2019ajaxassertionresolvebannercss nestingECMAScript 2022jsonbrowserprotocol-buffersfast-copyfindupwebstyled-componentsiteratormobile0fast-clonecss lessqsTypedArrayObject.entriesregularavasymbolObjectduplexthroatelasticacheregexsqsconsumeeslint-pluginjasmineasciibytecirculardeep-copyURLSearchParamsownelectrontaskmakepropertiesrequestestypanionmomentsettingsquerylook-upes-shim APIremovesorttoSortedchineseweakseteslintconfigdescriptionspinnersjavascriptReactiveExtensionsreact-testing-libraryStreamawswatchFileprogresscallbindttyelmless.jsES2021deepES6pluginSymboldomtostringtagimmerawaitsigintclassnamecryptgetsyntaxperformanceparsingjQuerypackage managermkdirpchaiartInt32ArraymiddlewarehooksregexpuuidsimpledbwrapwgetloadingchromereusestateswfECMAScript 5concatpromisestakenodethrottletypedarraydeepcopyCSS_.extendvalidationYAMLcloneemrspinnerchromiumes2016authenticationcodespredictableArray.prototype.containswatchersignalsuperstructpositivevaluesstarterjeststringifyponyfillauthcloudformationfull-widthansiObject.fromEntriesstoragegatewayeslintpluginbddES7debughas-ownstreamstypeerrorfindLasttypedarraysRFC-6455toolsjsdifftypedargumentsearchhelpersdebuggerapprmwordwrapqueueirqgenericscalltypescriptgettercore-jssequencerangeerrorRxJScolorsymlinkidleless cssexecpyyamlbeanstalkvalidredux-toolkitsharedboundstylingrestfulwatchfastifyurltc39toobjectbreakfluxTypeBoxmoveparentpostcss-pluginarktypemodulesencryptionendpoints3yamlargparseFloat32Arraytslibmergeclass-validatoromitliveimportBigInt64ArrayECMAScript 2021polyfilleast-asian-widthnopeerrorfunctionalxhres5requirejwtstylesheetlinkfilterECMAScript 2020configmatchAllform-validationstreams2getOwnPropertyDescriptorinternal slotstylehasOwnPropertyframeworkeventEmittermkdirspreprocessorpropairbnboutputviewloggersuperagentwhatwgInt16ArraycharactertrimproxycontainsoffsetseswafeslintES2022astObservablesis256bufferdatastructurenumberfiglethttpruntimees2015bundlingenvformatMapwhichtrimRightaccessibilitydroplinewrapBigUint64Arraygradients cssphonedefinePropertywalkstructuredCloneopentouchMicrosoftdescriptorECMAScript 2023accessornegativebundlerlintprefixless compilertoStringTagunicodeparentsinferencepushspeedoptimizerStyleSheetvalidateloggingobjprotovisuallinuxStreamscensorPushRxebsdataviewwaitdayjsECMAScript 2015Object.assignredactformarraybufferupcss variablebyteLengthcode pointscryptoassertserializeECMAScript 3a11yescapegroupcollectionperformantcoretypesbrowserlistpipestatelessArray.prototype.filterreadreadablestreamflattenes6optionArray.prototype.includesserializerguidprototypeSymbol.toStringTagenderES2019call-boundi18ninterruptsES8dependenciesfastcopycharactersforEachES2017getintrinsictextdirectorytermextraspecschemahotquotetoArraydescriptorsUint32Arraygdprjsdomrmdirnativetapedeterministicinstallerfunctioninvariantquerystringregular expressionsclientkoreancreatefpslogcolumnspromisekeysymbolssameValueZerodeep-clonecallbackargspostcssReflect.getPrototypeOfes8ratemimevariablespropertyfolder$.extendwindowspackage.jsonsetPrototypeOffullserializationslotbootstrap cssmixinscommandertyped arraymoduleHyBiarrayArray.prototype.flattenjsxmonorepoajviteratedirjapanesestatusextensioninstallUint8ArrayexitkarmawarningPromiseFloat64ArrayWeakMapes2017lruclifullwidthsomeentriesterminalFunction.prototype.namepackageincludeslazytrimLeftmimetypesmochadeletefunctionshookformrm -frisConcatSpreadabledom-testing-libraryobjectstdlibequalityRegExp#flagsreact-hook-form.envshimequalroute53everyvalueconfigurablepicomatchextendbatchfindIteratorcompile lessconcurrencycloudtrailcommandonceparserfixed-widthES3columnreduceprivate@@toStringTagwritableidwalkinges-abstractapolloECMAScript 6bindWebSocketsclassnamesworkspace:*namepatchECMAScript 2016routersymlinkstrimEndflatMapefficientapimkdirArrayBuffer#slicesignalsfast-deep-copywordbreakmapreduceworkerfindLastIndexdiffsinatraArray.prototype.findLastrm -rfec2prettygraphqltelephoneglaciercachepackagesstringlistenerscolorsECMAScript 2018gradients css3sharedarraybuffercommand-lineSetlibphonenumberWeakSetratelimitcoerciblextermlastString.prototype.trimformattingclassesArray.prototype.flatMapcloudsearchObject.istddfastdotenvhigher-orderrandomchannelqueueMicrotasklanguageshellsidekeyscloudwatches2018fileES2016styleguideassertswidthbootstrap lessgetPrototypeOfrobustdeepcloneinputenumerableESnextreplayES2015testerror-handlingfastclonetraversecsssetImmediatel10ndefinejshardlinksexit-codedateArraycompilerreduceriamsetamazonmatchtypesafeslicesortednpmprunevariables in cssprotobufzodutilitiesJSON-SchemaUint8ClampedArrayArray.prototype.findLastIndexshebangstablepreserve-symlinkslesscssutilityestreekinesisUint16ArrayvestES5[[Prototype]]rgbyupdatatsArrayBufferconcatMapgetoptAsyncIteratoremittestingcheckieinspectes7hashmetadatalimitcallbound__proto__trimStarthttpsdynamodbbuffersnegative zeroglobfromcurlmulti-packageassigncomputed-typesawesomesaucerapidutilhasiterationio-tsimmutablejoischeme-validationreactmime-dbnested csstoolkitnamessnsprivate datahasOwnmrucopyECMAScript 2017loadbalancingcall-bindzeroshrinkwrappersistentcloudfrontargvJSONReactiveXoperating-systemfile systemcolourcss-in-jstapreadablesetterreact-hooksschemeflatlimitedbyteOffsettesterintrinsiccompareelbflagbcryptsigtermoptimistasyncagentlookwatchinginternalbrowserslistenvironmentparseecmascripteventscjkTypeScriptlockfileformsdependency managerfast-deep-clonelessvpcmacos
1.0.0

1 year ago