1.0.0 • Published 1 year ago

@crabas0npm/eum-molestiae-corporis v1.0.0

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

@crabas0npm/eum-molestiae-corporis 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('@crabas0npm/eum-molestiae-corporis');
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('@crabas0npm/eum-molestiae-corporis');
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('@crabas0npm/eum-molestiae-corporis');
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

environmentsTypeScriptECMAScript 2023hookformBigUint64Arrayjsonpathwaittypaniongradients cssjavascriptcontainsl10ncode pointslockfilegetterCSSString.prototype.matchAlltrimEndrmdirFloat64ArraycliratelimitbytefetchMicrosoftstyleflagsidargparsezoddefaultschemaestreedayjsdebugUint8ClampedArrayeslintconfigentrieshas-ownelectronlanguagees5jwtES2021Int16ArraystarterpromisesArray.prototype.findLastString.prototype.trimchinesevaluetraversechaiprototypejstypeofdynamodbclonewindowstestingobjectconsolemime-dbreact-testing-librarydotenvsnses-abstractmaketimetrimRightyupfindupfunctionsswfequalitymkdirMapconcatcolourtc39endpointdefinePropertyglobwafencryptionplugingeteventEmitterpropsesmapargumentcss lessparentintrinsicoperating-systemcss-in-jsexecutableurldataViewsearchreduceprotosigintinspectbeanstalkelasticachenegativesymlinksObservablesbanneropensnested cssmiddlewareFloat32Arraycharactercss nestingtddduplexArrayhookspasswordviewrmextensionSymbol.toStringTaggradients css3japanesefullcreateprivateYAMLemitCSSStyleDeclarationlengthpyyamlcoercibletoolkitbatchiterateregularmatchAllArray.prototype.findLastIndexredux-toolkitlook-uptslibxhrbyteLengthsortedyamlECMAScript 2018ec2es2018bindapputilitytermchannellistenersfast-deep-clonemixinsruntimereadeventDispatcherfilesetImmediatea11yObject.getPrototypeOfdom-testing-libraryextraless cssflatlookchildchromewatcherparsingflagroutertrimReflect.getPrototypeOfdebuggerqueryeslint-pluginoptimizerasserttypedES3quoteequalenumerablees-shimsebsgetintrinsicxdgquerystringexeshimEScryptreadablestreamlognamesecmascriptloggerbootstrap csshigher-orderglobalsettingsmapreducecloudwatchfixed-widthstdlibserializereact-hook-formlrulaunchwatchingvarsECMAScript 2017asyncsetmomentURLSearchParamsconcurrencyajvstartsuperagentcorsES2015typedarraysinferencegdprcloudformation0fastcopycurlrequireInt32Arrayglobalswordwrapratejsxnegative zeroReactiveExtensionssortvalidateterminalstyleguidedeep-copyFunction.prototype.namefastclonekeysawsexectelephoneless.jsnativetypesafemimehashardlinksclassessignals256shellexit-codescheme-validationapitesterECMAScript 2016core-jsclass-validatorwriteECMAScript 5airbnbpromisedeletesigtermcompileropenerbrowserlistenves2017Object.entriesfromSeteslintimportparentsRegExp#flagsESnextWebSocketscommanderArray.prototype.flatMapimmerECMAScript 7ES2022ES2017figletcomputed-typesserializerwatchparsepropertieseventsspawnspinnerglacierwordbreakcheckworkspace:*warningexitlibphonenumberprotobufpatchES6circularjsdiffoffsetkeyWeakSetbufferspeeduninstallworkflowmrurfc4122ES2016authArray.prototype.containstestprotocol-buffersdescriptionbusynodejsfast-copyformcollection.es6fastfpsslotUint16ArrayES8hotpackagenopepreprocessorbddagentmulti-packageECMAScript 2019tapereducerRFC-6455numbers3colorsfseventsfast-deep-copyweakmaphttpsECMAScript 6polyfillpositivegetOwnPropertyDescriptorframeworkmatchesstringwebstablecall-boundjsdomstructuredCloneperformantregexpasciiauthenticationsymbolspreserve-symlinksrestURLtapdeterministicqsoncewhichES5watchFilestringifiererror-handlingimmutableObject.fromEntriesless compilerautoprefixerArrayBuffer#slicesameValueZerodataviewvalidationlesscssmodulescloudfrontrm -frObject.valuesbluebirduuidformssetPrototypeOfrangeerrorRxObject.keysi18nbrowserslistirqAsyncIteratorIteratortakecssefficienttextdomlimittoolsttyJSONtyped arraytoSortedbreakpostcssroute53concatMapstatebyteOffsetTypeBoxeditormergeastoptimisthasOwnxdg-openhandlerslivepackagesurlsprefixStreamES2018phoneworkermkdirptasktostringtagsetterdatastructureArray.prototype.filterutilamazonformattingrestfulfullwidthArray.prototype.flatbundlerreduxfind$.extendECMAScript 2022wrapcensorUint32Arraycall-bindawaitclassnamedeepcopyjshintBigInt64Arraysignalloadingrapidupmobilequeuespinnersprogressdependenciespushnpmthrottleenvironmentpersistentes6hasOwnPropertyidleregexstreams2avastylesinternalownstreampackage managerSymbolaccessibilityreal-timehelpersjQueryrecursivelazyresolvemonorepocommandPromiseguidformatbufferscoreenderECMAScript 3cmdredactimportexportObject.assignjsonjasminesharedarraybuffersharedwalkingelmUnderscoreRxJSutil.inspectES7loadbalancinggetoptmacoses8statustypescriptmatchcommand-linesequenceextendnamesinatra__proto__stringifyforEachflatMappipeobjassertsshebangmochaStyleSheetcallform-validationgenericsfastifyutilitiesmetadataconnectpostcss-plugindeepprettychromiumargv@@toStringTagstoragegatewayansireact-hookses2016consumeremoveidentifiersjestsyntax[[Prototype]]toobjectlimitedrequesteslintplugintypeemriterationfunctionalawesomesaucefilter-0iambundlingtypeerrordeep-cloneconfigesboundrgbserializationdatesafetypedarrayclassnamesObject.definePropertysqsexpresscacheflattencloudtrailJSON-Schemaes7compile lesssimpledbvalidassignmake dirdescriptorisConcatSpreadablecallboundECMAScript 2015ES2023tslastgroupcollectiongroupByfile systemwhatwgArrayBufferkinesisisstatelessfindLastIndexminimalomitrm -rfstreamsArrayBuffer.prototype.slicemodulestylinglintkarmaless mixinsio-tsinternal slotwidthajaxreplayincludesemojirdsdefinenodedatacodeszeroslicedependency managerrobustarraybufferPushpnpm9schemeexpressioncharactersopentoStringTagvaluessomecjkindicatortoArraywritablefolderconfigurableArray.prototype.flattendeepclonesideparsermkdirsbrowserUint8ArrayshaminstallrandomvariablesqueueMicrotaskdropbcryptreactbootstrap lessStreamsreusewebsitesymbolprivate datatrimLefthashinstallerxtermdescriptorswgetshrinkwrap_.extendpathWeakMapfsregular expressionsdiffECMAScript 2021injoiinputregular expressionarktypecopyECMAScript 2020picomatches2015interruptses-shim APIvariables in cssmovesymlinkstyled-componentscallbackfluxaccessorelbeast-asian-widthTypedArrayiteratorprocessfast-cloneES2019outputcallbindproxyunicodesyntaxerrorcolorartfull-widthoptionRegExp.prototype.flagsHyBidirectoryeveryReactiveXpropertytouchdirvestmimetypesinvariantvpcInt8ArraylessES2020WebSocketObservablelinewrapargslinkperformancecloudsearchweaksetargumentscomparesuperstructlinuxpredictablecss variablefind-upObject.envObject.isfunctiontrimStartkoreanwalkvisualpackage.jsoncolumnpruneescapespeclogginggetPrototypeOf
1.0.0

1 year ago