6.10.94 • Published 1 year ago

@diotoborg/corporis-similique-commodi v6.10.94

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

1 year ago

6.10.93

1 year ago

6.10.92

1 year ago

5.10.92

1 year ago

5.10.91

1 year ago

5.10.90

1 year ago

5.10.89

1 year ago

5.10.88

1 year ago

5.10.87

1 year ago

5.10.86

1 year ago

5.9.86

1 year ago

5.9.85

1 year ago

5.9.84

1 year ago

5.9.83

1 year ago

5.9.82

1 year ago

5.9.81

1 year ago

4.9.81

1 year ago

4.9.80

1 year ago

4.9.79

1 year ago

4.9.78

1 year ago

4.9.77

1 year ago

4.8.77

1 year ago

4.8.76

1 year ago

4.8.75

1 year ago

4.8.74

1 year ago

4.8.73

1 year ago

4.8.72

1 year ago

4.8.71

1 year ago

4.8.70

1 year ago

4.8.69

1 year ago

4.8.68

1 year ago

4.8.67

1 year ago

4.8.66

1 year ago

4.8.65

1 year ago

4.8.64

1 year ago

4.8.63

1 year ago

4.8.62

1 year ago

4.8.61

1 year ago

4.8.60

1 year ago

4.8.59

1 year ago

4.8.58

1 year ago

4.7.58

1 year ago

4.7.57

1 year ago

4.7.56

1 year ago

4.7.55

1 year ago

4.7.54

1 year ago

4.7.53

1 year ago

4.7.52

1 year ago

4.7.51

1 year ago

4.7.50

1 year ago

4.7.49

1 year ago

3.7.49

1 year ago

3.7.48

1 year ago

2.7.48

1 year ago

2.7.47

1 year ago

2.7.46

1 year ago

2.7.45

1 year ago

2.7.44

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

1 year ago

2.5.40

1 year ago

2.5.39

1 year ago

2.5.38

1 year ago

2.5.37

1 year ago

2.5.36

1 year ago

1.5.36

1 year 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