1.0.0 • Published 1 year ago

@landmineaknpm2/doloremque-accusamus-deserunt v1.0.0

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

@landmineaknpm2/doloremque-accusamus-deserunt Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2015 mostly-spec-compliant Reflect.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('@landmineaknpm2/doloremque-accusamus-deserunt');
var assert = require('assert');

assert.throws(() => getPrototypeOf(true));
assert.throws(() => getPrototypeOf(42));
assert.throws(() => getPrototypeOf(''));
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('@landmineaknpm2/doloremque-accusamus-deserunt');
var assert = require('assert');
/* when Reflect or Reflect.getPrototypeOf is not present */
if (typeof Reflect === 'object') { delete Reflect.getPrototypeOf; }
delete globalThis.Reflect;
var shimmed = getPrototypeOf.shim();
assert.equal(shimmed, getPrototypeOf.getPolyfill());

assert.throws(() => Reflect.getPrototypeOf(true));
assert.throws(() => Reflect.getPrototypeOf(42));
assert.throws(() => Reflect.getPrototypeOf(''));
assert.equal(Reflect.getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(Reflect.getPrototypeOf(new Date()), Date.prototype);
assert.equal(Reflect.getPrototypeOf(function () {}), Function.prototype);
assert.equal(Reflect.getPrototypeOf([]), Array.prototype);
assert.equal(Reflect.getPrototypeOf({}), Object.prototype);
var getPrototypeOf = require('@landmineaknpm2/doloremque-accusamus-deserunt');
var assert = require('assert');
/* when Reflect.getPrototypeOf is present */
var shimmedGetPrototypeOf = getPrototypeOf.shim();
assert.equal(shimmedGetPrototypeOf, Reflect.getPrototypeOf);
assert.equal(Reflect.getPrototypeOf([]), Array.prototype);

Tests

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

accessibilitycommand-lineenva11ydotenvs3dynamodbimportexportroutingfastifytapelimitedjoiless.jswidthequalityapiguidchromerequesttostringtagtslibawaitdependency managercreateeverybluebirdtapmulti-packageEStypeerroroncearrayfpssortedRxprivatemapcss-in-jsArray.prototype.flatvpcworkerieArray.prototype.flattendirespackage managerdayjsformattingdatastructureObject.definePropertysigintcloudtrailframeworkgetPrototypeOfhotArray.prototype.includesinternalreducerfast-copyfolderkoreanweakmapreact-hooksUint8ClampedArrayUnderscorearraysbannercode pointsproxyes-shimsstableprocesssidePushcoreexecstoragegatewaysignal256flatMapStreamwalkpipeargspatharktypeimmercheckserializerreal-timeamazonvalidatequeueMicrotaskes2016ECMAScript 2016idhasclassnamesArrayBuffer.prototype.sliceformsargparseworkflowlanguageCSSStyleDeclarationautoscalingajvglaciergradients cssregular expressionshashprogressirqistoucharraybufferagentsignalsPromisecharactersWeakSetRegExp.prototype.flagstrimRightclassesnativetoSortedencryptionassigncallbinddebugcodesparseredactsigtermes-shim APIserializationRegExp#flagspropertyexitdeep-clonerapidpnpm9String.prototype.trimcollection.es6testingpushtypeofcallbackstylingwindowscallboundhandlerscomputed-typesFloat64Arrayopenstyleguideruntimebundlerkarmaextendbuffermake dirstreamsgdprspeckinesisdomjQuerypostcsshasOwnPropertytextrestfulinroutefsentriessameValueZeroprotobufsetPrototypeOfl10ncssObject.entriesfiltertypeswatcherfullwidthlogdependenciesescapeobjextensionlazycloudfrontprefixgenericsnodecollectiondeepcloneincludesObject.isvaluescjkES8optimizeres2017sesinferencemapreducesuperstructhookformutilitiesutiltsfind-upspinnermobilestylestrimLeftJSON-Schemaregular expressiontyped arrayfast-cloneawesomesaucepolyfillpackagestreams2eslintbusyqsparentECMAScript 2015expressstdlib$.extendelmString.prototype.matchAllfetchjsxArray.prototype.filterbootstrap cssemrInt16ArrayeventEmitterIteratorviewrm -frpositivetrimEndfromtypedarrayquerystringYAMLsymboljsdiffasyncReactiveXdatafunctionminimalECMAScript 6lockfileendpointArray.prototype.flatMapremovestatuseslintpluginassertionhttpsHyBiroute53dataviewinterruptssqsscheme-validationcurlwhatwgECMAScript 2022i18nnameSetES5someFloat32ArrayES6terminallesscssprotocol-buffersaccessorerrortypescriptes2018wrapfile system0bundlingrecursivematchAllES2018es8MicrosoftsequencewatchFileMapArrayBufferxhrbyteOffsetregexomitsharedStreamsenderclonenpmindicatormimeshamtoStringTagmkdirpvalidationemitdefineconsoleredux-toolkitdeletehas-ownpackage.jsonteststreamdateavawalkingrobustsinatraec2linuxpackagesprototypestylesheetECMAScript 3rateestreetc39TypedArraychromiumvaluestarteroptimistbindpromisesreact-testing-library_.extendratelimitmixinsgetoptunicodestyleregularsymlinksflattenzeroyupwarningWebSocketrestpruneshrinkwrapwaitcss variablereadablepropconcurrencyoffsetpatchoptionfastcloneTypeScripttelephonecryptoenvironmentinspecttoolstypesafecryptjsonelbtraversecall-bindInt8ArrayfigletregexpES7less compilerthrottlespeedbyteLengthAsyncIteratorECMAScript 2021copytrimStarttoobjectelasticachevalidTypeBoxdeep-copygroupBypluginsetsorturlmocharmdirmkdirBigUint64Arrayweaksetloadingcensorshimlook-upformefficientfastelectronmodulesymbolswritetypedformatstructuredClonedeterministicgradients css3moveimmutablenopeyamlstatelessdropequalfindLastnodejsflatflagFunction.prototype.nameschemerandompasswordperformantrouterloadbalancingpropertiesbuffersvisualclassnameinvariantparsingnegativewafidletasktimeprivate dataperformanceiteratorcloudsearchStyleSheetpredictablehelpersECMAScript 2019watchingownECMAScript 5shebanggroupjasminetypereactpostcss-pluginmimetypesinputtakelintwatchbrowserslistcomparebreakconnectless mixinsemojilruswfansireact-hook-formsharedarraybufferObject.getPrototypeOfutilitydefinePropertyURL
1.0.0

1 year ago