1.0.10 • Published 2 years ago

@taktikorg/voluptas-recusandae v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@taktikorg/voluptas-recusandae 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 @taktikorg/voluptas-recusandae

Usage/Examples

var groupBy = require('@taktikorg/voluptas-recusandae');
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('@taktikorg/voluptas-recusandae');
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('@taktikorg/voluptas-recusandae');
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

momentcopyprocessrequireebsSymbolentriescommand-lineformattingObservablematchescall-bindflatMapbabelglobalshotshamserializeECMAScript 2023extrasigintmockingsigtermrapidqueueMicrotaskcollectionenvreplaytoobjectIteratorflagsflatsymlinkstransportvalidatorcss lesses2016@@toStringTaghttprangeerrorsharedECMAScript 2017cloudwatchquerycompileropensslasciiRegExp#flagswaitartphoneURLSearchParamsstableelbprivatebinariesWebSocketsauthenticationpathprivate datamapfpnativeES7global objectcoerciblecloudtraildeepclonedependency managerairbnblibphonenumberECMAScript 7full-widthsyntaxjsdomfindLasttrimStarthelperyupsetponyfillESObjectespreees-abstractloggingspringtraversestatepreprocessortoSortedECMAScript 2016snscss variablewhichparserJSON-Schemaslotes8iteratorvestes2017Object.keysvpcmobilecore-jsform-validationcryptoemitgenericsdatapicomatchArray.prototype.containsrulesReactiveExtensionsdomArray.prototype.includesbusyieconfigiamchinesePushHyBiiterationutilsassertnumberchromiumequales2018bufferfastdatastructuregetfpsglobaltoolkitrequestcompile lessbinarytyped arrayvisualreact animationless mixinsES2020eslinthookstestuninstalllazyless.jsfromnamestermregular-expressionvariables in csstoStringTagsymlinkenvironmentreduceraccessibilitylesscsseslint-pluginbundlerelasticachepackageseslintconfig3ddeepmakepackage.jsonmockArraycjkFloat32ArrayECMAScript 2022react-hooksloggerwafwritehas-ownfunction.lengthreadablerobustecmascriptdirES2022nested cssstatelessCSSWebSocketcloneintrinsicmacosuser-streamsRFC-6455bines6ECMAScriptECMAScript 2019localvalidationshim_.extendelectronredactpurefiltertypeexecfileMicrosoftdescriptiontypanionparse6to5apistartercensoreventsswfasteriskssafegesturesstringifysimpledbcolouranimationbeanstalktimeservicesuperagentsignalsclieslintpluginECMAScript 2015Int16ArraytoArrayworkspace:*preserve-symlinksservercryptformatarrayreduxpipesymbolextenddynamodbfetchfront-endjsonmulti-packageexit-codeArray.prototype.filterargvkoreanTypeScriptweakmapbootstrap cssowndifffilejoifulloptimizerregularsortedObject.valuesenumerablecurlobjxhrkeypluginbrowserlistreuseinvariantjson-schema-validationflattenArray.prototype.findLastUint16Arraygloblastescapesymbolsidentifierstoolspolyfillhardlinksimportexportfluxfigletvalidateramdaio-tsrgbfullwidthinternalcomparebundlingendpointconstcircularautoprefixertesterArray.prototype.flatflagassertionbabel-corevalidcssfixed-widthefficientdayjsviewObject.fromEntriesRxJSstoragegatewaypackage manageroptionestreegraphqles-shimsmrugetPrototypeOfyamlES2019mapreducecertificatesperformanceinpostcss-pluginnpmignoredependencieswarningtypesafelistenersdeep-copyAsyncIteratormake dirreactdataviewreact-testing-librarypropertyconsumebyteLengthcallbindsetPrototypeOfES2023RegExp.prototype.flagssetterwaapigetOwnPropertyDescriptordatetypedES2017jsdifffindLastIndexshebangroutingoperating-systemES3classnameslengthchromelanguageacornpoint-freecheckBigUint64Arrayposees-shim APItc39gradients css3touchtestinges2015concatMapauthproxyeffect-tsimmutablechaipromisegetoptfast-deep-clonedefinepushUint8ClampedArrayreact-componentindicatorharmonyoffsettsserializerless cssless compilerbytecontainstypescriptvarruntimesyntaxerrorapolloimmerfastifyfastcloneexpressionjapanesepopmotioncurriedlinuxUint32ArrayECMAScript 2021String.prototype.trimtostringtagtrimpruneassignarktypetypeofeventDispatchercallSymbol.toStringTagcreatespecreal-timeURLmonorepoECMAScript 5handlerprogressmatchAllconfigurabledeep-clonevariablesYAMLjestcommanderObject.isuploadworkerdropgroupByexithookformqsbootstrap lessweaksetES2015inference256ES2016nopeisnamecolumndotenvcomputed-typesignorestylePromisemanagerlockfilerouteinterruptsWeakMapequalitydescriptorsmatchrecursiveECMAScript 6s3trimEndtranspilebuffersbrowserprotocol-buffersredux-toolkitcollection.es6windowsshelltaketranspilerclienttypedarrayArrayBuffer#slicekinesisawsStreamsimportfunctionframerstylesheetMapstatuseveryregular expressionBigInt64Arraygetintrinsicsequencekeysgroupinternal slotnodepropertieshigher-orderquerystringpinoobjectStreamcss nestingprototypeamazonlivegdpremrback-endTypedArrayloadingi18nmodulejavascriptsortpnpm9stringminimalUnderscorejsmixinsforEachhashaccessorfile systemresolvefsvaluesarraybufferunicodeschemesetImmediateschemamkdirphasreadjsxjshintTypeBoxhasOwnPropertytrimRighta11yESnextsliceWeakSetlessspawnRxbyteOffsettelephoneinspectgitignoreReflect.getPrototypeOfES2021subprocessinputcall-boundrandomelmexecremoveisConcatSpreadableinstallerwritableloadbalancingprotoreducees5eventEmitterlogES5regexpec2linkiteratextermprefixfunctionalencryptionprotobufcss-in-jsajaxstyleguideprettystyled-componentspyyamlterminalglobal this valuenpmirqreadablestreampositivegetterglobalThisjwtObject.getPrototypeOffast-clonecloudsearchfnmatchautoscalingomitcolumnsObject.definePropertyjson-schema-validatorsidepasswordwgetECMAScript 2020fast-copynegative zerovarscharacterbrowserslistselfstructuredClonescheme-validationdirectoryarraysglaciercommandwindowdeletestylingbannersomeurlassertsdefinePropertymetadatastyleshandlersdeterministic$.extendzodutilitiesdataViewObservablesArray.prototype.flattenclass-validatorReactiveXnegativeexpressfastcopyJSONArray.prototype.flatMapjsonschemafantasy-landtacitUint8ArraybinddescriptorconsoleonceCSSStyleDeclarationidlequotequeue.envwhatwgdragstringifier.gitignoreArrayBuffer.prototype.sliceserializationroute53Int32Arrayincludesstreamserror-handlingcallboundtddhttpstslibjson-schemattyhasOwnshrinkwrapmovesuperstructbddenvironmentspersistentajvmergeES8codesfindtextoutput__proto__ES6executepostcssmkdirsInt8ArrayperformantES2018Array.prototype.findLastIndexcoreObject.entriesasynclintutilcloudformationsignalstreamoptimistchannelagentcolorreact-hook-formes7value0ansirdsclassnamesesdom-testing-libraryclassestypespropreact posefast-deep-copysqsString.prototype.matchAllworkflowbcryptsharedarraybufferStyleSheet-0widthcloudfrontSetcallbackformhelperstypedarraysargumenttrimLeftmkdirFloat64ArraychildspeedECMAScript 3argsSystem.globalboundinstallpatchcachefunctionswalkl10nzerospinnerjQueryeast-asian-widthzxmodulesawesomesauceastutil.inspectregexredirectspinnersesgradients cssenderFunction.prototype.name[[Prototype]]lruletECMAScript 2018settingsconcatlocationpredictable
4.4.89

1 year ago

4.4.88

1 year ago

4.4.87

1 year ago

4.4.86

1 year ago

4.4.85

1 year ago

4.4.84

1 year ago

4.4.83

1 year ago

4.4.82

1 year ago

4.4.81

1 year ago

4.4.80

1 year ago

4.4.79

1 year ago

4.4.78

1 year ago

4.4.77

1 year ago

4.4.76

1 year ago

4.4.75

1 year ago

4.4.74

1 year ago

4.4.73

1 year ago

4.3.73

1 year ago

4.3.72

1 year ago

4.3.71

1 year ago

4.3.70

1 year ago

4.3.69

1 year ago

4.3.68

1 year ago

4.3.67

1 year ago

3.3.67

1 year ago

3.3.66

1 year ago

3.3.65

1 year ago

3.3.64

1 year ago

3.3.63

1 year ago

3.3.62

1 year ago

3.3.61

1 year ago

3.3.60

2 years ago

3.3.59

2 years ago

3.3.58

2 years ago

3.3.57

2 years ago

3.3.56

2 years ago

3.3.55

2 years ago

3.3.54

2 years ago

3.3.53

2 years ago

3.3.52

2 years ago

3.3.51

2 years ago

3.3.50

2 years ago

3.3.49

2 years ago

3.3.48

2 years ago

3.3.47

2 years ago

3.3.46

2 years ago

3.2.46

2 years ago

3.2.45

2 years ago

3.2.44

2 years ago

3.2.43

2 years ago

3.1.43

2 years ago

3.1.42

2 years ago

3.1.41

2 years ago

3.1.40

2 years ago

3.1.39

2 years ago

3.1.38

2 years ago

3.1.37

2 years ago

3.1.36

2 years ago

3.1.35

2 years ago

2.1.35

2 years ago

2.1.34

2 years ago

2.1.33

2 years ago

2.1.32

2 years ago

2.1.31

2 years ago

2.1.30

2 years ago

2.1.29

2 years ago

2.1.28

2 years ago

2.1.27

2 years ago

2.0.27

2 years ago

2.0.26

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago