1.0.0 • Published 1 year ago

@rabiepenpm2/cumque-tenetur-iure v1.0.0

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

@rabiepenpm2/cumque-tenetur-iure 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('@rabiepenpm2/cumque-tenetur-iure');
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('@rabiepenpm2/cumque-tenetur-iure');
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('@rabiepenpm2/cumque-tenetur-iure');
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

toobjectdotenvlaunchcodesiamnopefastifymime-dbsetterdom-testing-libraryfolder_.extendObservableskarmaavadescriptorsworkerstreamhardlinkshookshookformdefinesymlinkschemeassertionstoragegatewaygetoptcomputed-typesJSON-Schemachromeopenquoteparsedeep-cloneconfigurableimportexportspeedes2018extendStreamsstringomitec2batchless.jspyyamlrateloggerparentsflatMapconnectbreakinternal slotpreprocessorequalsymbolrgbhttplinewrapcache256yamlstatusreact-hook-formregular expressionsrmauthprocesssignalstypescriptdirectorypostcss-pluginmatchmonorepostylesserializersigintpropertiescss nestingarktypethroatoutputdynamodbSymboljsonbusyjapaneserm -frfindupcreateReactiveExtensionstsvalidYAMLcolumnsameValueZeronegativewritableconcurrencyresolveagentstreams2ArrayBuffer#slicereal-timeroute53pushnpmRegExp.prototype.flagslesscssstatelessurlobjectboundcollectionzeroio-tstypelimittakepromisetrimStartArray.prototype.flatjsdiffexitshamvpcwalkingiteratestarterhas-ownstyleregularinterruptshotnumberWeakMapES2023restfuleventsasciiworkspace:*awsregexmakeUint16ArraymodulesdefinePropertyexeviewimportconcatES2018lintcommandbundlingPromisepreserve-symlinksdeleteinspectformmkdircallboundlibphonenumberbuffersFloat32Arrayrouterrequestnameruntimecolourhttpsreduxbrowserfindfullwidthimmutablees8compilerkoreanjasminecharacterbrowserlistgenericsuuidtermi18ndeepclonewebsite[[Prototype]]namesfunctionaldayjsbootstrap csspatchECMAScript 3loggingtoArrayRxTypeBoxtaskincludesES3extensionsafefileexit-codeequalitypackagesutiltrimRightjesttypeses6slotes7l10nmulti-packagefindLastenvironmentsdeep-copytypedarrayWebSocketsnodexdg-openlinuxtoolsescapeArray.prototype.flattenlengthwordwrapchinesepersistentformsjsdompropsyntaxerrortypanioncoercibleshareddatapackage manageropenscallbindArray.prototype.flatMapmkdirsserializeeslintconfigcloudformationprotobuffluxphonegradients cssjsonpathES2017mimetypesfull-widthgroupByargumentsObject.entriesbyteLengthdeepglobimmeroperating-systemamazoninBigInt64Arrayzodconsolesqsa11yReactiveXarrayIteratormatchAllArrayrecursivestdlibcloneutil.inspectcssfind-upstringifierInt8ArrayargumentajaxtrimLeftECMAScript 2020cliArray.prototype.findLastIndexrm -rfregular expressionwordbreakminimales2017defaultlanguagefastcloudtrailcollection.es6accessorisfullInt32ArrayjQueryextrachildStyleSheetshrinkwrapcorecompareexecutablequeuefixed-widthmapinstallreducertostringtagwalkObject.keysArray.prototype.filterhelpersreadablestreamansi0RegExp#flagsmkdirpinstallerreplaydomArrayBufferargsencryptionclass-validatortoStringTagcryptgetreadperformantparserhasOwnArray.prototype.findLastsigtermES8varsUint32ArrayArray.prototype.containsstylingformattingiterationelbreducecharactersenvjsxECMAScript 2015queueMicrotaskfast-copymomentweaksetsyntaxuninstallbeanstalklookes2015rangeerrorgroupes2016wafObject.valuesoffsetObject.isFloat64Arrayvariables in csseditorcss variablechaiObjectforEachelasticacheweakmapdataViewoptimistdiffdataviewfastclonemovepolyfillprettydatastructureurlscall-bindspeccolumnsfigletfast-deep-cloneUint8ClampedArrayrestcolorsflagsString.prototype.matchAllinferencerapidconcatMapsortperformanceexpresseveryfastcopystylesheetguidshellfstypedarraysaccessibilitytyped arrayparsingstyleguideenderebsloadingbootstrap lessESnextCSSStyleDeclarationpredictablerfc4122compile lessnegative zeroquerystringredactkeysajvbindspinnersECMAScript 2019-0bundleres-shim APIsesECMAScript 2021fpssortedstructuredCloneReflect.getPrototypeOfvalidateeslintpluginjwtdropidlematchesconsumenested cssobjjshintshimfindLastIndexworkflowES2015PushspinnerkeyunicodeObject.definePropertymapreduceeast-asian-widthwhatwgcopymimetypeofframeworkless mixinsECMAScript 2023ECMAScript 2022regexparraybufferrmdirpipesettingsnodejsmiddlewaredebugpruneES2016nativeargvSeterrortestinghigher-order
@rabiepenpm2/aut-minima-eum@rabiepenpm2/beatae-dignissimos-fugiat@rabiepenpm2/blanditiis-blanditiis-rerum@rabiepenpm2/commodi-eveniet-accusantium@rabiepenpm2/consequuntur-ut-ab@rabiepenpm2/consequuntur-voluptates-vero@rabiepenpm2/cumque-consectetur-maxime@rabiepenpm2/delectus-voluptates-nesciunt@rabiepenpm2/dignissimos-aut-nemo@rabiepenpm2/distinctio-maiores-asperiores@rabiepenpm2/dolore-itaque-maiores@rabiepenpm2/illo-impedit-libero@rabiepenpm2/impedit-explicabo-exercitationem@rabiepenpm2/ipsum-velit-minima@rabiepenpm2/itaque-aliquam-quis@rabiepenpm2/labore-eius-ipsum@rabiepenpm2/laborum-laborum-neque@rabiepenpm2/laudantium-ratione-in@rabiepenpm2/magnam-hic-eum@rabiepenpm2/minima-voluptate-impedit@rabiepenpm2/molestias-deleniti-non@rabiepenpm2/nam-omnis-rem@rabiepenpm2/natus-atque-sequi@rabiepenpm2/neque-repellendus-dolore@rabiepenpm2/odio-unde-quaerat@rabiepenpm2/odit-quae-quo@rabiepenpm2/omnis-ducimus-nam@rabiepenpm2/dolorem-assumenda-aliquid@rabiepenpm2/dolorem-provident-non@rabiepenpm2/doloremque-dolore-occaecati@rabiepenpm2/doloribus-rem-neque@rabiepenpm2/dolorum-iusto-ex@rabiepenpm2/dolorum-temporibus-rem@rabiepenpm2/ea-ad-perspiciatis@rabiepenpm2/earum-culpa-quae@rabiepenpm2/explicabo-cupiditate-ullam@rabiepenpm2/explicabo-ipsum-blanditiis@rabiepenpm2/explicabo-molestiae-ut@rabiepenpm2/fuga-eum-minus@rabiepenpm2/hic-ipsam-excepturi@rabiepenpm2/eius-commodi-expedita@rabiepenpm2/eius-quisquam-explicabo@rabiepenpm2/est-perspiciatis-culpa@rabiepenpm2/nobis-explicabo-doloribus@rabiepenpm2/non-iusto-esse@rabiepenpm2/nostrum-atque-rerum@rabiepenpm2/nostrum-molestias-voluptate@rabiepenpm2/numquam-in-architecto@rabiepenpm2/occaecati-ab-tenetur@rabiepenpm2/occaecati-facere-corporis@rabiepenpm2/odio-quos-quos@rabiepenpm2/quidem-sint-laboriosam@rabiepenpm2/quo-qui-accusamus@rabiepenpm2/reiciendis-at-nobis@rabiepenpm2/reprehenderit-cupiditate-illo@rabiepenpm2/ullam-facere-harum@rabiepenpm2/vel-beatae-veniam@rabiepenpm2/vero-debitis-modi@rabiepenpm2/vero-officiis-incidunt@rabiepenpm2/vero-porro-est@rabiepenpm2/vitae-aliquid-quam@rabiepenpm2/voluptas-voluptatem-fuga@rabiepenpm2/voluptatem-illum-magnam@rabiepenpm2/porro-reiciendis-eos@rabiepenpm2/praesentium-reiciendis-fugiat@rabiepenpm2/quaerat-maiores-dolor@rabiepenpm2/quasi-ullam-libero@rabiepenpm2/quia-impedit-excepturi@rabiepenpm2/quibusdam-repellat-excepturi@rabiepenpm2/repudiandae-adipisci-reprehenderit@rabiepenpm2/repudiandae-explicabo-accusantium@rabiepenpm2/saepe-alias-dolorum@rabiepenpm2/saepe-eaque-inventore@rabiepenpm2/tempora-incidunt-unde@rabiepenpm2/a-ut-deserunt@rabiepenpm2/ab-numquam-eaque@rabiepenpm2/ab-repellat-repellat@rabiepenpm2/accusantium-fugit-molestias@rabiepenpm2/alias-aperiam-optio@rabiepenpm2/alias-consequatur-delectus@rabiepenpm2/a-accusamus-exercitationem@rabiepenpm2/adipisci-perspiciatis-molestias@rabiepenpm2/alias-maiores-voluptatem@rabiepenpm2/aperiam-commodi-laudantium@rabiepenpm2/at-nulla-molestias@rabiepenpm2/at-voluptatum-accusamus@rabiepenpm2/consequuntur-possimus-architecto@rabiepenpm2/corrupti-quam-quasi@rabiepenpm2/delectus-incidunt-consectetur@rabiepenpm2/deleniti-eligendi-provident@rabiepenpm2/dignissimos-magni-nulla@rabiepenpm2/esse-necessitatibus-dolore@rabiepenpm2/est-sapiente-placeat@rabiepenpm2/expedita-amet-dolor@rabiepenpm2/harum-laborum-vero@rabiepenpm2/ipsum-quam-modi@rabiepenpm2/labore-quo-similique@rabiepenpm2/magni-similique-nisi@rabiepenpm2/maiores-porro-at@rabiepenpm2/officiis-placeat-numquam
1.0.0

1 year ago