2.1.11 • Published 3 days ago

@erboladaiorg/vitae-voluptas-consectetur v2.1.11

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

@erboladaiorg/vitae-voluptas-consectetur 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('@erboladaiorg/vitae-voluptas-consectetur');
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('@erboladaiorg/vitae-voluptas-consectetur');
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('@erboladaiorg/vitae-voluptas-consectetur');
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

deepcloneFloat32ArrayjsdomoptimizerimportformsObject.isserializersameValueZeroexecfolderregularisUint8ArrayformestreecloudfrontArray.prototype.flattenimmeragenthas-ownString.prototype.matchAlllibphonenumbermkdires-shimshelperPromisedescriptorsapijavascriptes2016mkdirsrmdirio-tsawaitdatevisualReflect.getPrototypeOfswfdefinelimitedparseruninstallduplexmimetypesdeep-clonepushESnextwhatwgdebugextensioncollection.es6onceserializationsomespeedsnsgetPrototypeOfbrowserlistJSON-Schemaclonefind-upinternal_.extendbddObservablesloadbalancingrm -rfdiffmatchestoArrayRxJSutil.inspectES8schemaimmutablemulti-packageopenerfastifythrottleenvsuperstructreact-hook-formairbnbES2015[[Prototype]]typescriptvarsBigInt64Arrayiamrm -frpyyamlwalkingES2020symlinksECMAScript 2020pnpm9processcopyiterateInt32Arrayreact poseeast-asian-widthformatdefinePropertyECMAScript 3mime-dbcall-bindfpseslintpluginlogginggdprWebSocketi18nfetchjQueryfinduptc39unicodeidleInt16Arraycall-boundkarmatesterargumentlinkES2019whichqslistenerssyntaxlogappsetPrototypeOfstructuredClonemochastdlibcloudwatchhassimple cacheloggeruprangeerrors3environmentexepromisesopenfast-deep-copysortedURLprotocol-buffersarktypehelpersbreakrobustcloudtrailartcommandercompilerfunctionshebangconfigurablerateparentArray.prototype.findLastIndexregular expressionsexecutablehttpES2023dragworkerregexkey parconsoledeletenodejscirculares6String.prototype.trimJSONsettingsopenseslint-pluginparentsmonorepoworkspace:*256mimepreserve-symlinksperformancemakevpcmatchESkeyqueueMicrotasktestingboundchromiumObservablesortbundlerspawnregular expressionWeakMapspinnerprefixsyntaxerroroptionArray.prototype.findLastHyBieslintcssMicrosoftes2018sesassertsequalityfull-widthes5setImmediateminimalES6Float64Arrayes2017enderiterationmatchAllremoveSymbol.toStringTagjshintschemexdg-openWeakSetiejasminecallbindtoobjectwebsitetypeofdataviewbyteLengthwritableObject.definePropertycolumnesfullfunctionsglobalsassertionecmascriptwidthlazyRxrmECMAScript 2022joiArrayBuffer#sliceelasticachesideroutingstreams2CSStypeerrorECMAScript 2016ECMAScript 2023findLastcoercibleUint8ClampedArraydeep-copytoStringTagtyped arraywriteprettysqsintrinsicbyteeventDispatchergetOwnPropertyDescriptorfasthookformdatastructuremergebluebirdcurlArray.prototype.flatMapslicedotenvresolveutilitiespersistentreact-testing-libraryglobtoolsYAMLspinnersweaksetperformantpluginObject.getPrototypeOferrornopelook-upMapBigUint64Array@@toStringTagarraysgetintrinsicistanbulzerodescriptionrfc4122phoneIteratoryamlpositivelanguagereact-hooksdependenciesES3ReactiveExtensionsmomentparsingtypesafescheme-validationweakmapcreatetrimStartArray.prototype.containsPushRegExp.prototype.flagsspringcharacterstapedayjsdebuggerlast
2.1.11

3 days ago

2.1.9

5 days ago

1.1.8

7 days ago

2.1.10

4 days ago

2.1.8

6 days ago

1.1.7

8 days ago

1.1.6

9 days ago

1.1.5

10 days ago

1.1.4

11 days ago

1.1.3

12 days ago

1.1.2

13 days ago

1.0.2

14 days ago

1.0.1

15 days ago

1.0.0

16 days ago