6.10.94 • Published 10 months ago

@diotoborg/corporis-similique-commodi v6.10.94

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

@diotoborg/corporis-similique-commodi 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 @diotoborg/corporis-similique-commodi

Usage/Examples

var groupBy = require('@diotoborg/corporis-similique-commodi');
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('@diotoborg/corporis-similique-commodi');
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('@diotoborg/corporis-similique-commodi');
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

eslintgraphqlexecfilejsdiffautoscalingstablehashutilitydescriptorstypesparserreduceshamphonejwttoArrayObject.iseslintplugines2015mixinses-abstractarraysreact posemulti-packageYAMLObject.definePropertyUint32ArraytypeerrorcssObjectsymbolsvisualreadablestreamhasOwnPropertyloadbalancinguninstalllockfileasynccopyenvironmentRxinputidentifiersreverseddeterministiccss nestingWeakSetspeed$.extendvariables in cssURLSearchParamssymlinkietstypeofECMAScript 2020hasOwnmakeES2020eventDispatcherbrowserlistbundlingmacosflattenhardlinksObservablelesssignalowntypaniongesturesfastclonejson-schema-validationstylesgradients cssforkgetPrototypeOfdiffTypedArraytrimLeftprefixwidthECMAScript 2022cryptpostcss-plugincacheassertsemrtoobjecteslintconfigjsxfpvariablesfulliteratorquerystringfastifyprotoreusebrowserreadmergepoint-freetoolsdateindicatorform-validationcallbackmatchAllerror-handlinglivebootstrap cssapihookformelectronbundlersyntaxerrorfullwidthfigletquotepolyfillformatexecutesignalsES6performantObservablesvalidationECMAScript 3vestserializerwhatwgtrimStartwritableArrayBuffer.prototype.sliceclassnamerapiddependency managertouchCSSequalitywindowtestpatchhigher-orderconstgdprmanagerUint16Arrayroute53simpledbtypecomparepredictablehelpersdeepcopykoreantranspilerObject.assignes2017modulestostringtagsetImmediateiamrequestformsequaldragArray.prototype.flatES8agentworkspace:*ESbddcall-boundbeanstalkcensorset__proto__preserve-symlinksstringencryptionTypeBoxstylesheetArrayBufferECMAScript 2016propertyexpressionelmbyteLengthboundcjkcommand@@toStringTagtransportroutecore-jsmaplogginguser-streamsarktypeES2019streamless cssyuphttpsistslibauthec2dropletcircularsignedutilsautoprefixerlintstyleaccessorrfc4122commanderansibufferstrimEndECMAScriptintrinsicwarningfast-cloneeventEmitterprocesstyped arraytddprettycoerciblerangeerrorAsyncIteratornegativelogES2023arrayfunctionales-shim APIendpointglobalcloudtrailschemabinariesglobalThisbannerpnpm9hooksconfigurable.gitignoreWebSocketsreduxHyBinopebrowserslistslotinferenceObject.values_.extendlastspringprotocol-bufferscallbindcloudfrontmomentponyfillzero3dvarconcatMapcryptocallboundcurlyamlpersistentjoisymbolwgetgenericshotgetintrinsicimmutableECMAScript 2019positiveterminalpreprocessorartparsesliceECMAScript 7jQueryfast-copygroupJSONextendform0sesassertSystem.globalprogressbincolumninvariantimmeres2016less.jsSymbol.toStringTagrobustfluxhandlersstructuredCloneformattingcss-in-js-0nested cssworkerpropertiesrulesamazonhas-ownmobileclipyyamlArray.prototype.includesinternallinkjshintglacierqueuecall-binddayjsreact animationoutputcomputed-typesjsonschemareactvalidatejapaneseoptimistinstallerspinnerglobalsloggerfindLastfnmatchsuperstructstoragegatewayawesomesaucefetchtc39termlrugetcertificatesmoduleshimreact-hook-formfull-widthargumentasterisksPromiseObject.fromEntriesRxJSRegExp.prototype.flagsgetOwnPropertyDescriptoruploadprunebusyUint8Arrayurlclonecallscheme-validationcolorsrfc9562collection.es6[[Prototype]]WebSocketuuidxhrmatchdomchannelreplaydataviewtacittextObject.getPrototypeOfweaksetselfStreamoffsettoolkitES2018TypeScriptMapforEachastserializationmetadataefficientgradients css3findlibphonenumberargvECMAScript 2017react-componentawsdeleteoptionenvObject.entriesinternal slot256concatsideramdarequiretoSortederrorInt8ArrayString.prototype.trimshebangproxypopmotionMicrosoftcompile lessgroupBygitignorepackage managertesteri18ncolourgetoptsettingsxtermdescriptiondynamodbsortedregularsameValueZeroextrafrombytemkdirssetterfantasy-landsnsrdstestinghttpArray.prototype.findLastgettertypedinajaxfast-deep-clonereact-hooksECMAScript 2015everyarraybufferInt16Arrayobjectlocalconsolecss variablereducerfast-deep-copytoStringTagidleio-tsutiljson-schema-validatorqssigintmrusymlinksUint8ClampedArrayentriesqueueMicrotasksubprocessstyled-componentssigtermdataViewreversecollectioncloudformationprivate dataestreedescriptorprotobuftypedarraysES3Array.prototype.flattenmapreducefixed-widthreal-timeless mixinspromiseimportFloat64Arrayemites7privatejsbyteOffsetpipe6to5RegExp#flagsenvironmentsescapettychineseclassnameshelperjsonregular-expressionReactiveExtensionsdirzodzxJSON-Schemaregular expressionpackagesfiledatachromiumdeep-clonecloudwatchStreamslengthsuperagentflatexpress.envasciiebsargsconfigcolumnsrecursivenodenativefastArray.prototype.containsconsumeoperating-systemjsdomsetPrototypeOfoptimizerisConcatSpreadableRFC-6455resolveArray.prototype.filtersyntaxtimekinesisECMAScript 2021someswfbootstrap lessregexclassesposeparsingnodejsvpcanimationfunction.lengthstartercodeses8esglobal this valuefpsenumerablesqsmovenameArray.prototype.findLastIndexjestStyleSheetnpmignoreflagsapolloES2016ES7weakmapignoreSymbolpasswordwaapishrinkwrapFloat32Arraystringifierdeep-copynpmspawnrandomlanguageIteratorwritees6runtimefindLastIndexirqiterateairbnbeventsschemeaccessibilityECMAScript 2023eslint-pluginajvredux-toolkitelbES5namesviewstateharmonyspecsharedarraybuffercreatepropenderinspectbabel-coremkdires2018framercharacterwindowsiterationcoredom-testing-librarycurriednumbercheckmake dirtoReversedpicomatchtakestylingglobal objectchaichildincludesjson-schemavalueES2017Function.prototype.nameworkflowspinnersloadingrgbclientmonorepodeepdirectoryfiltera11yminimalbabelonceObject.keyscompilertypesafecommand-lineArray.prototype.flatMapes-shimslistenersString.prototype.matchAllserializeECMAScript 6assignclass-validatorcontainsreadabledatastructures3routingsafequerycloudsearchfunctiontrimRightbcryptmkdirpSetsortwafeast-asian-widthReactiveXfastcopychromedefinedeepclonewaitArraypushfskeyseffect-tsecmascriptless compilerelasticachebindpackage.jsonassertion
6.10.94

10 months ago

6.10.93

10 months ago

6.10.92

10 months ago

5.10.92

10 months ago

5.10.91

10 months ago

5.10.90

10 months ago

5.10.89

10 months ago

5.10.88

10 months ago

5.10.87

10 months ago

5.10.86

10 months ago

5.9.86

10 months ago

5.9.85

10 months ago

5.9.84

10 months ago

5.9.83

10 months ago

5.9.82

10 months ago

5.9.81

10 months ago

4.9.81

10 months ago

4.9.80

10 months ago

4.9.79

10 months ago

4.9.78

11 months ago

4.9.77

11 months ago

4.8.77

11 months ago

4.8.76

11 months ago

4.8.75

11 months ago

4.8.74

11 months ago

4.8.73

11 months ago

4.8.72

11 months ago

4.8.71

11 months ago

4.8.70

11 months ago

4.8.69

11 months ago

4.8.68

11 months ago

4.8.67

11 months ago

4.8.66

11 months ago

4.8.65

11 months ago

4.8.64

11 months ago

4.8.63

11 months ago

4.8.62

11 months ago

4.8.61

11 months ago

4.8.60

11 months ago

4.8.59

11 months ago

4.8.58

11 months ago

4.7.58

11 months ago

4.7.57

11 months ago

4.7.56

11 months ago

4.7.55

11 months ago

4.7.54

11 months ago

4.7.53

11 months ago

4.7.52

11 months ago

4.7.51

11 months ago

4.7.50

12 months ago

4.7.49

12 months ago

3.7.49

12 months ago

3.7.48

12 months ago

2.7.48

12 months ago

2.7.47

12 months ago

2.7.46

12 months ago

2.7.45

12 months ago

2.7.44

12 months ago

2.6.44

12 months ago

2.6.43

12 months ago

2.6.42

12 months ago

2.6.41

12 months ago

2.5.41

12 months ago

2.5.40

12 months ago

2.5.39

12 months ago

2.5.38

12 months ago

2.5.37

12 months ago

2.5.36

12 months ago

1.5.36

12 months ago

1.5.35

1 year ago

1.4.35

1 year ago

1.4.34

1 year ago

1.4.33

1 year ago

1.4.32

1 year ago

1.4.31

1 year ago

1.4.30

1 year ago

1.4.29

1 year ago

1.4.28

1 year ago

1.4.27

1 year ago

1.4.26

1 year ago

1.4.25

1 year ago

1.4.24

1 year ago

1.4.23

1 year ago

1.4.22

1 year ago

1.3.22

1 year ago

1.3.21

1 year ago

1.3.20

1 year ago

1.3.19

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.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