1.0.0 • Published 13 days ago

@ptkhanh94npm/repudiandae-repellat-accusantium v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
13 days ago

@ptkhanh94npm/repudiandae-repellat-accusantium 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('@ptkhanh94npm/repudiandae-repellat-accusantium');
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('@ptkhanh94npm/repudiandae-repellat-accusantium');
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('@ptkhanh94npm/repudiandae-repellat-accusantium');
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

look-upfastifymodulereact-testing-libraryqueueclassnametostringtagtrimEndpnpm9serializationwatchingMicrosoftdirextendmakeObservablesruntimeprotomatchescorsreducerfull-widthuuidunicodeyupsignaltakeArray.prototype.findLastsortArray.prototype.containsschemenested csssyntaxerrortranspilejavascriptcoretoolkitsetextramruratenpmdom-testing-librarycompile lessmapstatusIteratortextReactiveExtensionsCSShelpersECMAScript 2017BigInt64Arraycomparejsonargparsewordwrapformatwgetfilees8assertslimitECMAScript 2021typed arrayharmonymake dirbabeldependenciesutilstc39iteratoreventDispatcherbrowsernegative zeroplugindefaultfindLastbddtddremovecmdEScopycommand-linejwtpopmotionprunethrottlebootstrap lessfetchbreakstringparseratelimittrimRightsymbolsdatasharedarraybufferjestgesturesmacostrimArraytsidbootstrap csscensorprogressobjectasyncinternal256lastcircularassigndomprettywaitrfc4122pyyamlsymlinkscolumnsjsonpathestapECMAScript 2022classnamesTypeScriptsetPrototypeOfoptionarktypeasserteverydebuggerjapaneseecmascriptdiffObject.fromEntriesObject.definePropertymixinsinvariantlinuxcomputed-typescode pointsperformantUint32Arrayestreegenericsexecutablesymbolbabel-coredescriptorslimitedpreserve-symlinksObject.valuesInt32ArrayArray.prototype.findLastIndexwarning$.extendURLSearchParamslinkJSONenvironmentArrayBuffer#sliceoffsetobjconcatMapbufferstouchsanitizehasESnextrm3dpropertiesshiminstallergetexpressioncolumndefinePropertyglobtermpropstylingsetImmediatejscollection.es6callboundconstpromiseskoreanStreamsfast-deep-cloneprivate datasetterparentsymlinktoStringTaginspectcodesdatastructurewalkisWeakMappackage managerchromereact posequotees6openlockfilegroupramdaapienumerableserializecolorsfunctionalincludesFloat64Arrayuser-streamspicomatchcommandershamutiltoobjectelectronnumberhashstyled-componentsdebugjson-schema-validatorisConcatSpreadablesuperstructresolvebatcheditordeepcloneconcurrencyreact animationes2017lintinterruptswebsiteFloat32Arraygradients css3trimStarthookformworkerfile systemoptimistfindfullECMAScript 2015efficienteventscharacterutilitymime-dbsigintpromiseargumentRegExp#flagsboundreadablestreamReactiveXwindowsjsdomreducefastcopylinewrapwritablequerystringES2018uninstallsafeoperating-systemarraybufferxtermopenerhttpbusyArray.prototype.flatMaptranspilerregexpdayjsfromtypeerrorbufferdeletel10nstyleguiderequireiterateexefantasy-landeast-asian-widthwaapipackage.jsonmomentguidcall-bindinferencewordbreakposeUnderscoreclonetestcall-boundtestingdataviewflatMapECMAScript 2018flatlogdotenvreact-hook-formsanitizationa11ypolyfilles2015clientgradients cssclischeme-validationbundlerapollotelephonepipewhatwgdeepjsxeventEmitteryaml__proto__encryptionnegativestylecss-in-jswatchFiletypescriptmetadatairqfixed-widthcalltestertypanionECMAScript 2023ES8Object.getPrototypeOfforEachconnectfast-clonegetoptpostcssstreams2signalsfindupfunction
1.0.0

13 days ago