1.0.0 • Published 15 days ago

@wemnyelezxnpm/soluta-aspernatur-id v1.0.0

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

@wemnyelezxnpm/soluta-aspernatur-id Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES5 spec-compliant Array.prototype.map shim/polyfill/replacement that works as far down as ES3.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Because Array.prototype.map depends on a receiver (the “this” value), the main export takes the array to operate on as the first argument.

Example

var map = require('@wemnyelezxnpm/soluta-aspernatur-id');
var assert = require('assert');

assert.deepEqual(map([1, 1, 1], function (x) { return x + 1; }), [2, 2, 2]);
assert.deepEqual(map([1, 0, 1], function (x) { return x + 1; }), [2, 1, 2]);
var map = require('@wemnyelezxnpm/soluta-aspernatur-id');
var assert = require('assert');
/* when Array#map is not present */
delete Array.prototype.map;
var shimmedMap = map.shim();
assert.equal(shimmedMap, map.getPolyfill());
var arr = [1, 2, 3];
var add4 = function (x) { return x + 4; };
assert.deepEqual(arr.map(add4), map(arr, add4));
var map = require('@wemnyelezxnpm/soluta-aspernatur-id');
var assert = require('assert');
/* when Array#map is present */
var shimmedMap = map.shim();
assert.equal(shimmedMap, Array.prototype.map);
assert.deepEqual(arr.map(add4), map(arr, add4));

Tests

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

cliflatMapInt8ArraygetPrototypeOfhookformreact posereducertermdependenciesfilterformatpicomatchomittexthttpsmacosgradients css3ttyfetchstreams2ES6ECMAScript 2018numbermetadatapopmotionmkdirprm -frTypeBoxsanitizeargstestingWeakMapi18nes2018JSONsyntaxposeasciitelephonetc39modulesinferenceframeworkimmutablecolumnslesscssbrowsercachebluebirddeep-cloneArrayBuffer#sliceECMAScript 2023Object.getPrototypeOfl10nqueryfullwidthRxhigher-orderreadablestreamcss variableramdatypedarraysmonorepoimportprivatetoStringTagaccessorpreserve-symlinksURLSearchParamsgroupByobjectvalidatebreakcssfastifypathmixinsentrieswindowsutil.inspectprefixmake dirxsscolourgroupyamltypeerrorArray.prototype.findLastES7escodeslookArrayvalidbootstrap cssdeepnpmescapejasmineeventDispatchercloneidle.envcommandgesturesbyteOffsetwatchinglibphonenumberthrottlelockfileinspectguidsigintweakmapes8a11ysetPrototypeOfcharacterartpoint-freetoobjectuuidsetImmediateSethashwarningstyled-componentsprotocol-buffersremovewordwrapsearchjsdomnodejsdirfunctionalinvariantansitddlimitio-tsdebuggerlinuxsymlinkcss-in-jsloggerstarterschemasomeuninstallInt16ArrayerrorvestfunctionspropertiesfunctionpostcsssortdescriptorsfasttrimStartprotobuftapeflagspromisecorstrimEndyupoptimizertacitreduxMapwordbreaklessbrowserslistHyBiboundes2017symlinksstylesheetwatchreact animationFunction.prototype.namecommanderrecursivepropertyES2018processasynccjkspeedlettypeextrastyletypesdiffrangeerrorcallboundquotenameReactiveExtensionsjsdiffenvironmentchinesevarfastcopyESsymbolscryptObject.definePropertyES2020shellUint8ClampedArraytoolkitdebugtypeofrmpackagesuperagentformattingvariablescontainsenumerableArrayBuffer.prototype.slicemakecryptoWeakSetrmdirgetsanitizationmatchesclassnamesconcattimeObject.valuespositiveinputArray.prototype.flattensignalstreamsfast-copyes2016isConcatSpreadableeventspackage managerterminalsharedarraybufferenvstdlibtakevalidator0ES2017descriptorprototypefindunicodeperformancevalidationargvrateECMAScript 2019parsees2015equalitycoredataviewrm -rfclassnamecallmergebundlingsuperstructshebangbootstrap lessexitPushconsumeMicrosoftwhichreuseworkspace:*statelesstestes-shim APIECMAScript 7WebSocketsarktypeopencode pointspreprocessorwalkscheme-validationSymbol.toStringTagcensordescriptioninstallirqstringdatastructurereact-testing-libraryArray.prototype.containseventEmitterconnectFloat64ArrayObservablescomputed-typesrobustredactshrinkwrapsequencecoercibleUint16ArraytypaniontrimRightgdpronceiterationassertionwaitloggingeslint-pluginsettertypescriptsidevaluesinternalhasOwntoolsECMAScript 2022RFC-6455Array.prototype.filterdotenvcolorsutilitiesprotoefficienteslintpluginfull-widthtslibbyteLengthString.prototype.matchAlldaterapidindicatorclasseslrucss nestingCSSutilityhaswriteregularbufferwidthchecksignalsintrinsicframerloadingcallbindfixed-widthrequiretoArraylook-up__proto__AsyncIteratorexecoptimistdeletegradients csscollection.es6regexjapanese$.extendless mixinsdataViewtoSortedECMAScript 3UnderscorefstsworkerjQueryjavascriptjson-schema-validatorconfigflagreactUint8Arrayautoprefixerairbnbes5taskgraphqlchannelnodefullpostcss-pluginconcatMapcompile lessfindupoffsetsortedTypedArrayBigUint64ArrayStreamfast-deep-copyponyfillmatchAllmime-dbqueueMicrotaskspringstringifyencryptionparserstatusInt32ArraySymbolmobilemapcss lessTypeScriptkeyssymbolString.prototype.trimmoveemojiiterateES2023Promiseeslintconfigobjoperating-systemsharedkarmaArray.prototype.includesYAMLES2019bundlerECMAScript 6zodeast-asian-widthxhruser-streamsprettytapes6Object.keysconcurrencyArray.prototype.flatnopecurriednested cssapiquerystringmodulejson-schema-validationsliceoutputestreebcryptwgetparentsbusyemitargparsebatchvalue
1.0.0

15 days ago