7.9.110 • Published 11 months ago

@devtea2026/a-quia-odit-possimus v7.9.110

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

@devtea2026/a-quia-odit-possimus Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES5 spec-compliant Array.prototype.reduce 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.reduce depends on a receiver (the “this” value), the main export takes the array to operate on as the first argument.

Example

var reduce = require('@devtea2026/a-quia-odit-possimus');
var assert = require('assert');

assert.equal(reduce([1, 2, 3], function (prev, x) { return prev + x; }), 6);
assert.equal(reduce([1, 2, 3], function (prev, x) { return prev + x; }, 1), 7);
var reduce = require('@devtea2026/a-quia-odit-possimus');
var assert = require('assert');
/* when Array#reduce is not present */
delete Array.prototype.reduce;
var shimmed = reduce.shim();
assert.equal(shimmed, reduce.getPolyfill());
var arr = [1, 2, 3];
var sum = function (a, b) { return a + b; };
assert.equal(arr.reduce(sum), reduce(arr, sum));
assert.equal(arr.reduce(sum), 6);
assert.equal(arr.reduce(sum, 1), 7);
var reduce = require('@devtea2026/a-quia-odit-possimus');
var assert = require('assert');
/* when Array#reduce is present */
var shimmed = reduce.shim();
assert.equal(shimmed, Array.prototype.reduce);
assert.equal(arr.reduce(sum), reduce(arr, sum));

Tests

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

negative zerovalidationautoscalingurlsbrowsersliststreamprivatethrottlefigletvalidatefullReactiveXcheckES2020objsqsES2016ECMAScript 2023xhrargumentnamepersistentbootstrap cssfastclonehasOwnPropertystylingunicodeproxymergeguidchaiObject.fromEntriesreduxwatchingtapwriteoffsetrgbgenericses5hotlinuxrm -rfes2016compareinputoptionsomecollectioniamObject.keyslengthtoSortedES2017connect$.extendargvimportcircularliveglobalsmoveformatparentscall-boundwhichkinesisdataviewgetPrototypeOfIteratorstatetoobjectprunevariablesponyfillrapidtypedarraydeletelook-uparraymetadataeditorbundlertypeofArray.prototype.includespackage managersymbolsavatypedarraysprocessconsoleinhasOwnmacoscss variabletrimfileworkernodejscolumnsreadableObject.valueseventEmitterequalitytypebeanstalkbluebirdisConcatSpreadablereusereducevalueparsingES3classnameregularless.jsownchineseonceindicatorgetintrinsicminimalchromiumcssregular expressioniteratefast-clonefast-deep-copyreact-hook-formappidrequiresameValueZerosidedotenvobjectassertsdeterministicproto_.extendlookJSON-Schemaprotocol-buffersjsdomasciiwindowsfull-widthuninstallES2018randombddjavascriptbreakslotlinkincludesdeepauthelbtextopenermakewaf@@toStringTagArray.prototype.containsfseventsfiltercmdreal-timefluxtakejapaneseObjecttesterECMAScript 2020schemereducerwalkupttylinewrapnodeqscodesworkspace:*TypeScripthardlinkssequencehttpsexees-shimsless compilerBigInt64ArrayinterruptsflagshelperscloudformationastsignalmiddlewaredataViewregexcharactersbufferses2018nested cssgetOwnPropertyDescriptorconcatMapcontainsloggingPushpluginCSSjscomputed-typesshimcryptstylesrestES2022css lessopenexpressionfunctionsmatchAllauthenticationnopemkdirselasticacheamazoneast-asian-width[[Prototype]]less csssetPrototypeOfmkdirpcall-bindequalsymlinkBigUint64Arrayfsshebangargumentselmformattingcolouresperformantgradients cssefficientbrowserstatelesskoreanjsonbannerStyleSheetsinatraUint8Arrayoutputperformancecjkcore-jstestingfastcopyES5scheme-validationinstallpropbundlingglacierSetArray.prototype.findLastIndexruntimedebuggerbrowserlist0Function.prototype.namejsdiffes6forEacheslintpluginexitintrinsicstreams2callbackwatchfile systemloadbalancinges7fromhooksfindmrustringifyarraysphoneWeakMaprmdirtypedescapecolorcoercibleidentifiersxtermelectrondefinePropertyreactObject.entrieshttpURLmixinsRxprefixURLSearchParamsECMAScript 2019stdlibexec.envArray.prototype.findLastcreateawaitdeep-copyconfigagentnpmboundutilityrdsspecclass-validatorinspectdependenciesconcatfindLastMapprototypesortedendpointtrimStartform-validationprettybuffercompilerESnextconfigurablewatcheryupclivisualeventsqueueECMAScript 7monorepocallbindquoteObservableArraysafepolyfillmimetypeslessenvironmentswaitECMAScript 2017error-handlingECMAScript 5toolscompile lessreadablestreamdynamodbtoArrayprivate datautil.inspectArray.prototype.flattenhas-owntc39yamlmodulesbatchdescriptorsnsawesomesaucefullwidthextrarfc4122dom-testing-libraryinferenceio-tsdomdeepcopyes-shim APIpnpm9whatwgshamformsarraybufferhookformredactaccessorHyBirequesterrorgetwrapWebSocketmochabindvariables in cssvpceslintObject.assignwalkinggetopttermenderloadingshrinkwrapObject.istapeurlArrayBuffer.prototype.sliceES6formcss-in-jscloneparentcolumnpreserve-symlinksfast-copypostcsstostringtaglibphonenumberrouterremovedayjsInt32Arrayreact-hooksRegExp#flagsUnderscorenamesargparseObservableseventDispatcherbootstrap lessecmascriptes2015findupcloudwatchsigintduplexpipeiterationi18nvaluesexit-codedefinegradients css3ECMAScript 3telephonedeepclonees-abstractsuperstructgroupByqueueMicrotaskReactiveExtensionswritableaccessibilitywarningthroatReflect.getPrototypeOfstringifiermatchdescriptionpatchmimedeep-clonestatusencryptionebssimpledbdatastructurespinnersratelimittimereact-testing-librarytddquerykeystrimLeftsignalsfolderYAMLinternalcharacterworkflowutildefaultxdglintJSONnativetrimEndnumbercollection.es6callboundcopyrobustexpressflatdiffhigher-orderbcryptCSSStyleDeclarationexecutablespawncommanderflatMapenumerableenvieassigncommand-linehasimmerpredictablestyled-componentsprogressframeworkrestfulargslazyajvzodArrayBuffer#slicecss nestingautoprefixerECMAScript 2021ECMAScript 2015internal slotUint32ArrayrecursiveMicrosoftpropertiestaskES2015weaksetvalidlesscssslicemomentfunctionalcloudfrontserializerjshintpostcss-pluginartArray.prototype.flatMaptoStringTagkarmaglobaljQuerycloudtrailtestwgetl10nzerosyntaxerrormatchesarktypeirqeslintconfigwordwraplruxdg-openRxJSPromisefastifymulti-packagegetterlastimportexportsettingsUint8ClampedArraystoragegatewayoperating-systemtypescriptwatchFileWeakSetsharedarraybufferWebSocketstypesserializepasswordStreamcolorsjoiInt8ArrayutilitiesloggereverywebdatecallidleoptimistObject.definePropertymodulereadweakmapasyncflattenparsesearchfindLastIndexregexpSymbol.toStringTagserializationsymbolextensiondependency managerwidthrmstyledropsyntaxentriesmap
7.9.110

11 months ago

7.9.109

11 months ago

7.9.108

11 months ago

7.8.108

11 months ago

7.8.107

11 months ago

7.8.106

11 months ago

7.8.105

11 months ago

7.8.104

11 months ago

1.1.29

1 year ago

1.1.28

1 year ago

4.5.72

1 year ago

4.5.73

1 year ago

4.5.70

1 year ago

4.5.71

1 year ago

4.5.74

1 year ago

4.3.57

1 year ago

1.1.30

1 year ago

7.8.103

11 months ago

1.1.34

1 year ago

7.8.102

11 months ago

1.1.33

1 year ago

7.8.101

11 months ago

6.8.87

12 months ago

4.3.59

1 year ago

1.1.32

1 year ago

7.8.100

11 months ago

6.8.86

12 months ago

4.3.58

1 year ago

1.1.31

1 year ago

6.8.85

12 months ago

6.8.84

12 months ago

1.1.37

1 year ago

6.8.83

12 months ago

1.1.36

1 year ago

1.1.35

1 year ago

5.6.80

12 months ago

4.5.62

1 year ago

4.5.65

1 year ago

4.5.66

1 year ago

4.5.63

1 year ago

4.5.64

1 year ago

4.5.69

1 year ago

4.5.67

1 year ago

4.5.68

1 year ago

5.6.75

12 months ago

5.6.74

12 months ago

3.1.38

1 year ago

3.1.37

1 year ago

3.1.39

1 year ago

7.8.89

12 months ago

7.8.88

12 months ago

7.8.87

12 months ago

6.6.80

12 months ago

6.6.81

12 months ago

6.6.82

12 months ago

6.6.83

12 months ago

5.6.77

12 months ago

5.6.76

12 months ago

5.6.79

12 months ago

5.6.78

12 months ago

3.1.45

1 year ago

3.1.44

1 year ago

7.8.93

11 months ago

7.8.92

11 months ago

7.8.91

11 months ago

7.8.90

11 months ago

7.8.97

11 months ago

7.8.96

11 months ago

7.8.95

11 months ago

7.8.94

11 months ago

4.3.60

1 year ago

3.1.41

1 year ago

3.1.40

1 year ago

7.8.99

11 months ago

3.1.43

1 year ago

7.8.98

11 months ago

3.1.42

1 year ago

4.3.61

1 year ago

2.1.37

1 year ago

1.1.23

1 year ago

4.1.45

1 year ago

1.1.27

1 year ago

4.1.46

1 year ago

1.1.26

1 year ago

4.1.47

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

4.4.61

1 year ago

4.4.62

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

4.2.47

1 year ago

4.2.48

1 year ago

4.2.49

1 year ago

1.0.23

1 year ago

5.5.74

1 year ago

4.2.53

1 year ago

4.2.54

1 year ago

6.7.83

12 months ago

4.2.55

1 year ago

4.2.56

1 year ago

4.2.50

1 year ago

4.2.51

1 year ago

4.2.52

1 year ago

4.2.57

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

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