1.0.0 • Published 1 year ago

@ptkhanh94npm/et-quis-doloremque v1.0.0

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

@ptkhanh94npm/et-quis-doloremque 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('@ptkhanh94npm/et-quis-doloremque');
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('@ptkhanh94npm/et-quis-doloremque');
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('@ptkhanh94npm/et-quis-doloremque');
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

commandownES2017encryptionnamesmetadatainternalsymlinksprotocol-bufferswafcallbackserializesqsArrayBuffer#slicehashcjkgetintrinsicconfighookformrobustflatMapsortedmixinsstructuredClone_.extendeast-asian-widthbundlerconsumeReflect.getPrototypeOfcensorcharactersomekeysgesturesiteratefpsthreekoreanmochaimportpropertycolorsyamlairbnbinputmomentsiginttypedenvtddrm -rfequalityinspectfast-copythrottlewritecorsYAMLgetoptemitRFC-6455ES7expressionFloat32ArrayhttpschannelposeTypeBoxInt16Arrayrm -frroute53optimistpredictableArray.prototype.findLastIndextermRegExp.prototype.flagsequalwordbreakebsenvironmentform-validationrmstateautha11ymakesharedarraybufferoutputtimeminimalbusysliceimmerfetchjsonuuidreadfindObject.getPrototypeOfmatchesjapanesefastponyfillBigInt64Array0parsingobjeslintcss lessindicatormiddlewarecloudformationenumerablesigtermwidthnpmcssstylingpackage.jsonwatchingmergemime-dbhas-ownvariables in cssawscloudsearchclassnameentriesCSSStyleDeclarationcolumnreact-hook-formstylesjsxreact animationexitutil.inspectasyncconcatrequireargsrgbfilereact posedataViewconcatMaps3bufferssnsi18nArrayBuffersyntaxerror256ES2015ArrayweaksetfastcloneurlsharedwalkingtrimEndes2018workflowchaifolderrandomES5libphonenumberES2018safestreamtoArrayvisualJSONsameValueZeroprivate dataargumentES8typanionfast-deep-copylastECMAScript 2018validateasciicryptoiteratornativedeep-copyconnectclitakees6real-timeReactiveExtensionsglobdom-testing-libraryECMAScript 6stylepromisejasmineincss-in-jsassertcurlfixed-width-0reuseimmutablecall-binderror-handlingcrypterrorruntimepassworddayjsisArray.prototype.containstypesmodulenodejestexit-codeArrayBuffer.prototype.slice@@toStringTaglimitRxJSviewprogressecmascriptefficientutilitiesprototypevalidationanimationpostcss-pluginlinewrapjavascriptregular expressionsECMAScript 2020MicrosoftbundlingautoprefixerMapclass-validatorpreprocessorworkertrimRightfindLastIndexwritableinstallsuperstructformssymbolbrowsertoSortedarktypeflagsgroupBymodulesparsemimetypeswhichieESinstallerfunctiontc39byteOffsetrapidbatchnegativegraphqlomitinvariantSetassertsloadbalancingsequencelintTypedArraytrimStartObjectzodjsonpathwgethotmonoreposignalES2020react-hooksregularkinesiscallbind__proto__clonewarningstylesheetdatastreams2xtermURLformconfigurablepromisesbootstrap cssfindLastbuffersesquerystringelmterminalmimetoobjectclassnamesdotenvSymbol.toStringTagparentsreplaypropeventDispatchersimpledbArray.prototype.includesgetPrototypeOfreadableless.jsspeedfiltersyntaxexpressdynamodbstringperformancemake dirvariablestraverseObservablesupaccessibilityweakmapuninstallpnpm9Array.prototype.flatnumbertapObject.ises7deepcoercibleelbmobileboundtaskUint8ArrayInt32Arraytextnopeshimidleredux-toolkitproxyhandlerspostcssiamstatuskeyES2019higher-orderstyled-componentsdefinePropertyframeworkassignloadingwordwraprecursivedirreactratees-shimsprefix[[Prototype]]bdddragtestingtelephonecomparees-shim APIRegExp#flagsObject.valueslogECMAScript 2022callObject.entriescore-jsinternal slotes5valuesdebuggerlivefind-upsearchfile systemtouchsymlinkcallboundprettyparserchecktrimLeftqueryirqincludescloudwatchprocessless cssES6guidsetPrototypeOfpyyamlES2016utilStreamworkspace:*fsspringwalkstringifiercolourtesterconcurrencysetterframerstoragegatewayestreemrudebugpersistentoffsettypescriptfindupeventses2017avapopmotionObject.assignless compilerpackagesxhrbindUint32Arrayspinnersformatregexplessesdeep-clonearraybuffercollection.es6listenersqueuenegative zeroreact-testing-libraryECMAScript 2016toStringTagtesttypesafeendpointregular expressiondroplesscssquotevalueECMAScript 5picomatchtypeobjectchinesecode pointsstringifylinktostringtagObject.definePropertyautoscalinghasOwnPropertycorepolyfillflattencloudfrontloggeryupgradients cssES2021watcherexecrequestzeroUint16Arraycommand-lineinterruptsdescriptorswebdependency managerFloat64Arrayjwttypeofcall-boundObject.keysmacostoolsgenericsIteratorvalidio-tsmapreduceflatkarmalanguageECMAScript 2017pushremoveTypeScriptargvObject.fromEntriesnodejsfast-deep-cloneforEachclassestrimreducerArray.prototype.flattenes8fastifyObservableelasticachedirectorymkdirpes2015ECMAScript 2019WeakSeteverycopyarraytslibcolumnswrapescapeauthenticationes2016fullprivatehelpersparentvestagentdeepcopyfrom
1.0.0

1 year ago