4.10.110 • Published 11 months ago

@diotoborg/earum-eligendi v4.10.110

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@diotoborg/earum-eligendi 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('@diotoborg/earum-eligendi');
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('@diotoborg/earum-eligendi');
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('@diotoborg/earum-eligendi');
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

ECMAScript 2018deterministicefficientUint16ArraycoverageserializationweaksetES8RegExp.prototype.flagsreactdeletenametoobjecttesterlibphonenumberfast-copyasynctostringtagfigletlookReactiveExtensions256jsonhashconfigmatchdefineautoprefixeriamparserflatMapes5offsetbundlerstringtrimRightdeep-copyio-tsrequestkinesisdataprivate dataloadbalancingcomputed-typesfind-upobject.gitignoreinvariantMicrosoftswfcurriedvpcStyleSheetTypeBoxreuseponyfillimmutablermdirreduxtypebyteLengthstructuredClonesource mapajvtoArrayshamsideawsgetintrinsicupcjkES6multi-packagetypedarraysWeakSettypedarraylocalglobalThisidvalidatelistenerschildsyntaxcloudtrailrfc4122ES2017preprocessorObject.valuesmake dirdataViewbytetypeoffullunicodeast6to5jQueryjapaneseeslintplugincollection.es6toolkitbinariescacheharmonycompilerregular-expressionbyteOffsetshrinkwrapsomefunctionstyled-componentssharedignoretransportinternalObject.entriesnpmsortedfastclonenegative zeroeventserrorflagreal-timegetPrototypeOfconstexecutebrowserlistenvfast-deep-copy3dfpsECMAScript 2016fast-deep-cloneprunelogresolveiterateECMAScript 6isConcatSpreadablespinnersmodulesformatCSSPromisefromrm -rfbeanstalkloggerStreamsenvironmentforEaches7codesdataviewECMAScript 5debugwaapiredirectjson-schemafunctionsparentsdropes2015i18nprogressglobalsqueuecharacterwhatwgtc39privatenegativereact posegetidlebufferslinkcircularcommand-linehelpercloneiteratorschemaec2callstringifierArray.prototype.findLastworkerpackage.jsonsetImmediateindicatoramazonanimationfastifyconfigurablejestshebangxtermendpointarktypeequalityString.prototype.matchAllatommapreducehigher-ordertake0argsinputperformantdeepBigInt64ArraysafearraysconsumearraySymbolfast-cloneFunction.prototype.nameESnextidentifierschromecensornameslanguagekeys_.extendreworkwebemitmonorepodebuggerObject.getPrototypeOfwgetreact-hooks
4.10.110

11 months ago

4.10.109

11 months ago

4.10.108

11 months ago

4.10.107

11 months ago

4.10.106

11 months ago

4.10.105

11 months ago

4.9.105

11 months ago

4.9.104

11 months ago

4.9.103

11 months ago

4.9.102

11 months ago

4.8.102

11 months ago

4.8.101

11 months ago

4.7.101

11 months ago

4.7.100

11 months ago

4.6.100

11 months ago

4.6.99

11 months ago

4.6.98

11 months ago

4.6.97

11 months ago

4.6.96

11 months ago

4.6.95

11 months ago

4.6.94

11 months ago

4.6.93

11 months ago

4.6.92

11 months ago

4.6.91

11 months ago

4.6.90

12 months ago

4.6.89

12 months ago

4.6.88

12 months ago

4.6.87

12 months ago

4.6.86

12 months ago

4.6.85

12 months ago

4.6.84

12 months ago

4.6.83

12 months ago

4.6.82

12 months ago

4.6.81

12 months ago

4.6.80

12 months ago

4.6.79

12 months ago

4.6.78

12 months ago

4.6.77

12 months ago

4.6.76

12 months ago

4.6.75

12 months ago

4.6.74

12 months ago

4.6.73

12 months ago

4.6.72

12 months ago

4.6.71

12 months ago

4.6.70

1 year ago

4.6.69

1 year ago

4.6.68

1 year ago

4.6.67

1 year ago

3.6.67

1 year ago

3.6.66

1 year ago

3.6.65

1 year ago

3.6.64

1 year ago

3.5.64

1 year ago

3.5.63

1 year ago

3.5.62

1 year ago

3.5.61

1 year ago

3.4.61

1 year ago

3.4.60

1 year ago

3.4.59

1 year ago

3.4.58

1 year ago

3.4.57

1 year ago

3.4.56

1 year ago

3.4.55

1 year ago

3.3.55

1 year ago

3.3.54

1 year ago

3.3.53

1 year ago

3.2.53

1 year ago

3.2.52

1 year ago

3.2.51

1 year ago

3.2.50

1 year ago

3.2.49

1 year ago

3.2.48

1 year ago

3.2.47

1 year ago

2.2.47

1 year ago

2.2.46

1 year ago

2.2.45

1 year ago

2.2.44

1 year ago

2.2.43

1 year ago

2.2.42

1 year ago

2.1.42

1 year ago

2.1.41

1 year ago

2.1.40

1 year ago

2.1.39

1 year ago

2.1.38

1 year ago

2.1.37

1 year ago

2.1.36

1 year ago

2.1.35

1 year ago

2.1.34

1 year ago

2.1.33

1 year ago

2.1.32

1 year ago

2.1.31

1 year ago

2.1.30

1 year ago

2.1.29

1 year ago

2.1.28

1 year ago

2.1.27

1 year ago

2.1.26

1 year ago

2.1.25

1 year ago

2.1.24

1 year ago

2.1.23

1 year ago

2.1.22

1 year ago

2.1.21

1 year ago

2.1.20

1 year ago

2.1.19

1 year ago

2.1.18

1 year ago

2.1.17

1 year ago

2.1.16

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.1.10

1 year ago

1.1.10

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago