2.10.100 • Published 1 year ago

@erboladaiorg/corporis-magni v2.10.100

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@erboladaiorg/corporis-magni Version Badge

github actions coverage License Downloads

npm badge

An ESnext spec-compliant Object.groupBy 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 proposed spec.

Getting started

npm install --save @erboladaiorg/corporis-magni

Usage/Examples

var groupBy = require('@erboladaiorg/corporis-magni');
var assert = require('assert');

var arr = [0, 1, 2, 3, 4, 5];
var parity = function (x) { return x % 2 === 0 ? 'even' : 'odd'; };

var results = groupBy(arr, function (x, i) {
    assert.equal(x, arr[i]);
    return parity(x);
});

assert.deepEqual(results, {
    __proto__: null,
    even: [0, 2, 4],
    odd: [1, 3, 5],
});
var groupBy = require('@erboladaiorg/corporis-magni');
var assert = require('assert');
/* when Object.groupBy is not present */
delete Object.groupBy;
var shimmed = groupBy.shim();

assert.equal(shimmed, groupBy.getPolyfill());
assert.deepEqual(Object.groupBy(arr, parity), groupBy(arr, parity));
var groupBy = require('@erboladaiorg/corporis-magni');
var assert = require('assert');
/* when Array#group is present */
var shimmed = groupBy.shim();

assert.equal(shimmed, Object.groupBy);
assert.deepEqual(Object.groupBy(arr, parity), groupBy(arr, parity));

Tests

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

fastcopyinstallervarsInt8Arrayvisualjson-schemaajaxArray.prototype.flattenUint8ClampedArrayhigher-orderfast-clonerandomcommandenvironmentObject.fromEntriesdynamodbstyleguidearthasmergerfc4122arraybufferviewtimetransportfast-deep-copyES3processhtmlapiassertpathstylefindLastIndexsesObject.islistenersmaketc39efficientchannelnamesreversedreact-testing-librarydescriptioncallbackatompruneRxpackagelocationmkdirpECMAScript 5deterministicrequirereworkgetOwnPropertyDescriptortypedarrayequalfast-copyespreeArray.prototype.filterES2018cacheglobtoArraycolumn0executeexecvpcpostcss-plugincall-boundmapwalktddtermchildArray.prototype.flatMapemojioptionpipeswfindicatormapreduceworkflowmonorepotypesafebundlingtranspilegenericsreact animationtrimLeftpackage manageressharedconfigurablequerybrowserlinkWeakSetiamlookglobalsgetclassnameReactiveExtensionsRxJSwaitautoscalingpicomatchstylingrobustreadableBigInt64Arraydom-testing-libraryinputtestes2018emrpoint-freexmlqsdeepclonehookformtouchlastonceprototypees2015installservicesetFloat32ArrayAsyncIteratorec2fullwidthTypedArrayconfigweakmapdircoverageRFC-6455_.extendbrowserlistwidthnopecomparecodesArray.prototype.includesansiprogresscoloreast-asian-widthenumerablemomentcharacterchromeFloat64Arraycode pointsmockingidpropertiesmake dirawsanimationexpressionasciieffect-tsoutputhasOwnregular expressionsUnderscorehasOwnPropertyredirect$.extendajvimportCSScommand-linerequestentrieses2016dotenvvariablesponyfillwgetamazongdprECMAScript 2016callbindwalkingglacierObject.keysmockcontainstestingmkdirsspececmascriptfoldereslintpluginkeyvaluesFunction.prototype.nametypeofparentfastbabelhttpsassignweaksetRegExp.prototype.flagsguidrdsclientslicespeedsafetoolkitgitignoreArray.prototype.containsflag.gitignoreaccessibilityjsl10nIteratorObject.getPrototypeOfStreamsES2020typed arraysettersymlinksconcatstyled-componentsreusefullinvariantdomframerpositiveSetfromawesomesauceuninstallbufferECMAScript 7offsetjsdomHyBioptimistjson-schema-validationsimpledbutilitiestslibString.prototype.matchAllArrayobjcloudwatchcopyvalidationio-tsvalidcloudsearchhelperpureappfnmatchtacittostringtaggetterpinoArray.prototype.flatdayjscomputed-typesbabel-coresettingscollectionautoprefixernegative zeroRegExp#flagsperformanceclass-validatorbinariesfpagentCSSStyleDeclarationplugincolourmochareact-hookswaapisuperagentinstrumentationiteratereact posejsxbounddeep-clonemetadataredux-toolkitdragenderarraysintrinsicphonebinaryrestrmserverfigletargvjsonpyyamlperformantignorergbpropapollopatchmatchAllebsbddmanipulationflattentypescriptjoiacornbinequalityserializebrowserslistassertssameValueZeroworkercloneenvECMAScript 2017fscss-in-jsjsonschemaistanbulimportexportpromiseslotclassestraversewarninghttpshebangfast-deep-cloneexpressinferenceES2017unicodefind-upisConcatSpreadablezxinspectquerystringformprotostructuredClonenpmvartypeerrorformstoolsasta11yttystartersuperstructcollection.es6jsdiffregexchinesebyteOffsetdebugaccessorarktypecjkECMAScript 2019nodejsloadbalancingroute53languageshamdefinedatequeueMicrotaskutil.inspectsymbolfpsieUint16ArraydescriptorstoReversedfunctiondataviewprettycolumnstapeeslintArrayBuffer#slicereact-hook-formgroupBydefinePropertyletelectronsqskeysshimerrorreal-timeES2021Int32ArrayargumentArrayBuffer.prototype.slicecoretypesWebSocketskinesismulti-packageURLlockfileairbnbpnpm9rssMaptesterdirectorylength6to5transpilerelbfinddebuggertaptrimEnds3validatorlintquotejQuerycreatestreamsdeep-copymkdirforkObservablesECMAScript 2015groupcallsetPrototypeOfeslintconfigutilrulesiteratorconstECMAScript 2020nametrimargsReflect.getPrototypeOfcurlcryptofileECMAScript 2018popmotionreadproxyzodwhatwgcommandercloudtrailWebSocketuuidECMAScript 2023busyURLSearchParamsbyteLengthtypanioneverygetoptESnextreduxwebwhichObject.assignspringstringifygetPrototypeOfkoreanparsevalueObject.definePropertycoercibleimmutableflagsES2023feedYAMLES7threeflatmodulesmodulepushtrimStartwriteformatsyntaxerrorjson-schema-validatorbindhas-ownform-validationtaketoStringTagyamlassertiongraphqlprivate dataBigUint64Arraybyteserializationpackages256fixed-widthlibphonenumberzeroxhrTypeScriptbundlersideloggercloudfrontrm -frES5sinatraprotobufArray.prototype.findLastvalidatearrayresolvextermjapaneseprotocol-buffersdatastringcallboundeslint-pluginjavascriptpropertydependency managerstableprefixlruworkspace:*functions[[Prototype]]String.prototype.trimemitnegativeglobalmobileECMAScript 3package.jsonfront-endtoobjectcli3durlmatchObservableframeworkECMAScript 2021colorscensorInt16Arrayreadablestreamspawnes5minimalvestredactcheckflatMaputilsreducersubprocess-0posefastifyi18nconsumequeueregular-expressionwafschemewritableextraregexpspinnerseventDispatcherES6isObject.valuestypedloggingreactECMAScript 6WeakMapnumberstoragegatewayown
2.10.100

1 year ago

2.10.99

1 year ago

2.10.98

1 year ago

2.10.97

1 year ago

2.10.96

1 year ago

2.10.95

1 year ago

2.10.94

1 year ago

2.10.93

1 year ago

2.10.92

1 year ago

2.10.91

1 year ago

2.10.90

1 year ago

2.10.89

1 year ago

2.10.88

1 year ago

2.10.87

1 year ago

2.9.87

1 year ago

2.9.86

1 year ago

2.9.85

1 year ago

2.9.84

1 year ago

2.9.83

1 year ago

2.9.82

1 year ago

2.9.81

1 year ago

2.9.80

1 year ago

2.9.79

1 year ago

2.9.78

1 year ago

2.9.77

1 year ago

2.9.76

1 year ago

2.9.75

1 year ago

2.9.74

1 year ago

2.9.73

1 year ago

2.9.72

1 year ago

2.9.71

1 year ago

2.9.70

1 year ago

2.9.69

1 year ago

2.9.68

1 year ago

2.9.67

1 year ago

2.9.66

1 year ago

2.9.65

1 year ago

2.9.64

1 year ago

2.9.63

1 year ago

2.9.62

1 year ago

2.9.61

1 year ago

2.9.60

1 year ago

2.9.59

1 year ago

2.9.58

1 year ago

2.9.57

1 year ago

2.9.56

1 year ago

2.9.55

1 year ago

2.8.55

1 year ago

2.8.54

1 year ago

2.8.53

1 year ago

2.8.52

1 year ago

2.7.52

1 year ago

2.7.51

1 year ago

2.6.51

1 year ago

2.6.50

1 year ago

2.6.49

1 year ago

2.6.48

1 year ago

2.6.47

1 year ago

2.6.46

1 year ago

2.6.45

1 year ago

2.6.44

1 year ago

2.6.43

1 year ago

2.6.42

1 year ago

2.6.41

1 year ago

2.6.40

1 year ago

2.6.39

1 year ago

2.6.38

1 year ago

2.6.37

1 year ago

2.5.37

1 year ago

2.5.36

1 year ago

2.5.35

1 year ago

2.4.35

1 year ago

2.4.34

1 year ago

2.4.33

1 year ago

2.4.32

1 year ago

2.4.31

1 year ago

2.4.30

1 year ago

2.4.29

1 year ago

2.4.28

1 year ago

2.4.27

1 year ago

2.4.26

1 year ago

2.4.25

1 year ago

2.4.24

1 year ago

1.4.24

1 year ago

1.4.23

1 year ago

1.4.22

1 year ago

1.4.21

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.2.20

1 year ago

1.2.19

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago