1.0.0 • Published 2 months ago

@f1stnpm3/eveniet-sapiente-aperiam v1.0.0

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

@f1stnpm3/eveniet-sapiente-aperiam 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('@f1stnpm3/eveniet-sapiente-aperiam');
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('@f1stnpm3/eveniet-sapiente-aperiam');
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('@f1stnpm3/eveniet-sapiente-aperiam');
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

copyreactrateObject.isreplayStreamswalkrobustcloudformationcorsreadablestreamframeworkES3emrfast-copytsfindLastIndexexelooktoArrayviewglobconfigurablejsxsham$.extendArrayBufferwatchFilevalidatepositivees2018terminalfilterformatdescriptionrapidsymlinksserializeconcatsettingsString.prototype.matchAllArray.prototype.flatwebwhatwgsigtermwatcherObject.keysyupfilejshintmobileES2016sameValueZerotypeofsyntaxerrormime-dbec2zodentriesrangeerrorprivate dataspinnerproxywordwrapregexpES2020errortypeseslintconfiglintES2017ECMAScript 2020equalisConcatSpreadablereal-timeschemeflatMapdeletegradients css3wrapspeciteratestyled-componentsownpyyamlcloudwatchautoprefixerlinkfetchlivevpcloggingeventsimportexportcolumnsJSONserializationgetoptrequestmetadatatypedsetPrototypeOfprogressTypedArrayjsonpathcolumnnativeStyleSheetSymbol.toStringTagesclicomputed-typesasynccallobjectdeterministictrimvalidtslibmruinstallerdescriptorbindsigintcallbindsymbolsvaluesperformantcolorsbyteLengthtelephonecloudsearchfastcore-jsArray.prototype.includesstartoffsetdependency managerwebsitegetPrototypeOftapefindlogmulti-packagereduceencryptiontypedarrayansitesterfluxprotobuftasknpmmochaES8route53Float32ArrayenvdataViewcryptpreprocessorstylingECMAScript 2023middlewarepromisehttppruneparseindicatorineslintreusepreserve-symlinkspostcss-plugininspectforEacheslintpluginawaitjsdiffhelpersimportECMAScript 2022ES6dotenvshebanglesscssSymbolObject.valuesexeccmd__proto__coercibleArray.prototype.containss3descriptorsstarterinferencerestes5dom-testing-libraryoptimizerwidthObjectpredictablelook-upregularcallboundtyped arraystreams2charactersajvbluebirdjQueryUint8ClampedArrayisYAMLnamesexit-codestoragegatewayspawntakermdirartFloat64ArrayassignupbatchrecursiveObject.assigncurlworkspace:*censorRxsetImmediatereducerWebSocketclassnamesArrayBuffer#sliceexpressionhandlerses7jestfull-widthuuidECMAScript 2019propertyfullwidthmixinsbufferprefixpathkoreantc39jsdombootstrap cssreact-testing-librarychildcircularargvtrimRightfast-deep-copyextensionstatelesslimitbeanstalkESbufferswatchqueryponyfillautoscalingkeyReactiveExtensionspackage.jsonestreecharacterhookformclassesio-tsserializerutil.inspectjwtworkflowfunctionsbusyvisualsuperagentwhichresolvetestingglobalsutilurlserror-handlingwarningprocessglacierswfnegativearraybufferparentthroatamazondomtrimLefttoobjectlruawsBigInt64Arrayes6WebSocketsmapdatetypesafeoperating-systemtypeerrorjavascriptminimalmimetypesECMAScript 2018mkdirtostringtagaccessorfseventsdependenciescallbackWeakMapshrinkwrapparsingthrottlearrayshellinputmatchescompilerbcryptrfc4122checkPushes-shim APIperformanceidleurlawesomesauce@@toStringTagcontainseast-asian-widthsortedassertratelimitchinesepersistentregexFunction.prototype.namettycommandfastifymergeRegExp.prototype.flagsaccessibilityes8wordbreakparsersetshimkinesisArray.prototype.findLastIndexiamloggermapreduceunicodefolderJSON-Schemainternalpasswordyamlstylesfile systempatchbyteOffsetzeroqueuepnpm9stringcollection.es6emojiexitfunctionalArray.prototype.flattentddmkdirpcommand-linetraverseArray.prototype.filtercjklistenersslicejsontrimStartopensformattinggetteres2017Int32Arraydropbundlinggdprwalkingtextclassnamermgloballess.jsscheme-validationrandomcachebannerhooksECMAScript 6Object.entriesobjchromiumES5promises_.extendprototypeconnectECMAScript 2021gradients cssstatusless compilerless mixinsstateprettyexecutablenegative zerocloudtrailelmECMAScript 2016argumenta11ynameES7limitedES2015environmentseditorsortonceTypeBoxwgeti18nECMAScript 2017consoletypeObject.definePropertyformstypescripthasOwnloadingbyteimmerhasphonesometimepackagesflagspropertiessqsmimeconsumeoptimistdataviewfullnope.envhardlinksparentsdefaultutilityvalidationguidHyBiassertscompile lessmodulesidentifiersidescapees-abstractdeep-clonematchwindowssequencerm -rfCSSStyleDeclarationRxJSprotocol-bufferses-shimsform-validationxdg-openincludeseveryES2021pluginxhrdeepcopyendpointgroupBystylesheetpostcssjoilibphonenumberfast-cloneMaploadbalancingtapstdliblastflagfast-deep-cloneslotfastclonestructuredCloneredactarktypedatal10nlinuxelasticacheeventDispatchereslint-pluginlessworkerjapanesedefineredux-toolkitsymbolopendayjsxtermECMAScript 7deepclonesnsairbnbpackage managerprotoefficienthashenvironmentoutputchaiavainvariantsidexdgfpshas-ownTypeScriptRegExp#flagsflattenchromewaitgenericsRFC-6455browserlistutilities
@f1stnpm3/recusandae-repudiandae-minima@f1stnpm3/repellendus-architecto-omnis@f1stnpm3/rerum-cumque-vel@f1stnpm3/sed-beatae-enim@f1stnpm3/sequi-corporis-libero@f1stnpm3/exercitationem-voluptate-esse@f1stnpm3/expedita-consequuntur-repellendus@f1stnpm3/explicabo-quidem-sunt@f1stnpm3/facilis-possimus-possimus@f1stnpm3/facilis-suscipit-rem@f1stnpm3/id-distinctio-minus@f1stnpm3/illo-reiciendis-voluptatibus@f1stnpm3/illum-earum-at@f1stnpm3/impedit-consequuntur-aliquam@f1stnpm3/in-rem-accusantium@f1stnpm3/inventore-vel-repellendus@f1stnpm3/ipsa-corrupti-reiciendis@f1stnpm3/ipsa-provident-laboriosam@f1stnpm3/ipsam-reiciendis-saepe@f1stnpm3/ipsam-unde-delectus@f1stnpm3/ipsum-quia-fuga@f1stnpm3/iste-natus-eaque@f1stnpm3/itaque-saepe-vitae@f1stnpm3/maxime-totam-sequi@f1stnpm3/modi-nobis-quasi@f1stnpm3/molestiae-beatae-nisi@f1stnpm3/molestiae-numquam-totam@f1stnpm3/molestias-cupiditate-perferendis@f1stnpm3/molestias-molestiae-vel@f1stnpm3/nam-adipisci-repudiandae@f1stnpm3/nam-hic-consequatur@f1stnpm3/necessitatibus-sed-culpa@f1stnpm3/nemo-quasi-commodi@f1stnpm3/nemo-voluptas-modi@f1stnpm3/neque-blanditiis-sapiente@f1stnpm3/neque-culpa-voluptates@f1stnpm3/nesciunt-adipisci-alias@f1stnpm3/nisi-vel-nisi@f1stnpm3/nobis-laboriosam-maiores@f1stnpm3/nobis-saepe-facere@f1stnpm3/perferendis-itaque-animi@f1stnpm3/porro-optio-cumque@f1stnpm3/quas-est-odio@f1stnpm3/quasi-possimus-beatae@f1stnpm3/qui-facilis-alias@f1stnpm3/quibusdam-eligendi-soluta@f1stnpm3/quibusdam-officiis-magni@f1stnpm3/non-error-ipsum@f1stnpm3/nulla-esse-laudantium@f1stnpm3/officia-magnam-accusantium@f1stnpm3/officiis-illo-eum@f1stnpm3/omnis-voluptatem-molestiae@f1stnpm3/optio-error-asperiores@f1stnpm3/pariatur-alias-vel@f1stnpm3/quis-voluptates-nostrum@f1stnpm3/quisquam-neque-quibusdam@f1stnpm3/quo-alias-laborum@f1stnpm3/quo-vel-sed@f1stnpm3/quo-voluptatibus-est@f1stnpm3/quos-nihil-repellat@f1stnpm3/sunt-ullam-minus@f1stnpm3/suscipit-natus-veritatis@f1stnpm3/tempora-cum-provident@f1stnpm3/tempora-vero-alias@f1stnpm3/totam-cupiditate-at@f1stnpm3/totam-temporibus-eaque@f1stnpm3/ullam-ut-dolor@f1stnpm3/unde-cupiditate-molestias@f1stnpm3/veritatis-consectetur-error@f1stnpm3/vitae-minus-at@f1stnpm3/vitae-quos-ut@f1stnpm3/voluptatem-fuga-numquam@f1stnpm3/voluptatem-tempore-consequuntur@f1stnpm3/voluptates-minus-fugiat@f1stnpm3/voluptates-minus-laboriosam@f1stnpm3/voluptates-quibusdam-provident@f1stnpm3/voluptatum-corporis-similique@f1stnpm3/ad-corporis-labore@f1stnpm3/adipisci-odit-similique@f1stnpm3/aliquid-reprehenderit-dolor@f1stnpm3/amet-fugit-fugit@f1stnpm3/amet-soluta-vero@f1stnpm3/aperiam-harum-ex@f1stnpm3/architecto-aliquam-sequi@f1stnpm3/architecto-dignissimos-at@f1stnpm3/architecto-quos-rerum@f1stnpm3/asperiores-repellat-rerum@f1stnpm3/asperiores-sapiente-illum@f1stnpm3/assumenda-totam-recusandae@f1stnpm3/cum-assumenda-placeat@f1stnpm3/cumque-beatae-quod@f1stnpm3/cumque-non-ex@f1stnpm3/cupiditate-dicta-ab@f1stnpm3/debitis-corrupti-quasi@f1stnpm3/debitis-distinctio-libero@f1stnpm3/deserunt-recusandae-voluptatum@f1stnpm3/dignissimos-aliquid-saepe@f1stnpm3/dignissimos-similique-quasi@f1stnpm3/distinctio-blanditiis-doloribus@f1stnpm3/dolore-mollitia-repellendus
1.0.0

2 months ago