4.10.110 • Published 10 months ago

@diotoborg/earum-eligendi v4.10.110

Weekly downloads
-
License
MIT
Repository
github
Last release
10 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

10 months ago

4.10.109

10 months ago

4.10.108

10 months ago

4.10.107

10 months ago

4.10.106

10 months ago

4.10.105

10 months ago

4.9.105

10 months ago

4.9.104

10 months ago

4.9.103

10 months ago

4.9.102

10 months ago

4.8.102

10 months ago

4.8.101

10 months ago

4.7.101

10 months ago

4.7.100

10 months ago

4.6.100

10 months ago

4.6.99

10 months ago

4.6.98

10 months ago

4.6.97

10 months ago

4.6.96

10 months ago

4.6.95

10 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

11 months ago

4.6.89

11 months ago

4.6.88

11 months ago

4.6.87

11 months ago

4.6.86

11 months ago

4.6.85

11 months ago

4.6.84

11 months ago

4.6.83

11 months ago

4.6.82

11 months ago

4.6.81

11 months ago

4.6.80

11 months ago

4.6.79

11 months ago

4.6.78

11 months ago

4.6.77

11 months ago

4.6.76

11 months ago

4.6.75

11 months ago

4.6.74

11 months ago

4.6.73

11 months ago

4.6.72

11 months ago

4.6.71

11 months ago

4.6.70

11 months ago

4.6.69

11 months ago

4.6.68

11 months ago

4.6.67

11 months ago

3.6.67

11 months ago

3.6.66

11 months ago

3.6.65

12 months ago

3.6.64

12 months ago

3.5.64

12 months ago

3.5.63

12 months ago

3.5.62

12 months ago

3.5.61

12 months ago

3.4.61

12 months ago

3.4.60

12 months ago

3.4.59

12 months ago

3.4.58

12 months ago

3.4.57

12 months ago

3.4.56

12 months ago

3.4.55

12 months ago

3.3.55

12 months ago

3.3.54

12 months ago

3.3.53

12 months ago

3.2.53

12 months ago

3.2.52

12 months ago

3.2.51

12 months ago

3.2.50

12 months 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