4.9.68 • Published 1 year ago

@hishprorg/nulla-repellat v4.9.68

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

@hishprorg/nulla-repellat 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 @hishprorg/nulla-repellat

Usage/Examples

var groupBy = require('@hishprorg/nulla-repellat');
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('@hishprorg/nulla-repellat');
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('@hishprorg/nulla-repellat');
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

figletsignalsTypeBoxkoreanefficientpropreducercodesObject.getPrototypeOftypesaferedirecthooksirqspinnersworkersafe[[Prototype]]jsonfast-0URLSearchParamsgradients cssponyfilles2015effect-tsfantasy-landestreecss lessopensslsymlinkscallperformancekeyselectronURLbyteLengthdefineless.jsconfigshim.gitignorephone@@toStringTagdataviewRegExp#flagsglacieremrprotobufviewnpmspawn3dserviceES2016ec2jQueryencryptioninternal slottrimes2017BigUint64ArraySymbol.toStringTagUint8ArrayhasOwnprettymovebincall-boundECMAScript 2019signalmomenttoStringTagECMAScript 2018fast-copyvalidatemrujson-schema-validationaccessibilityES6everyremoveauthvariables in cssmixinsrequiregdprdescriptionflagyaml_.extendtypedextendAsyncIteratorIteratorStyleSheetfastifytoolsinferencefront-endurlelasticachetypanionyuppureidentifierstostringtagnativeUint8ClampedArraysesECMAScript 2017ttydom-testing-libraryignoreMapzerotypesArray.prototype.includesnamereact-hook-formvaroutputhasOwnPropertyRxasyncclassnameoptioncloudfrontbindiamgraphqlschemaArray.prototype.filterdayjsgetPrototypeOfregularcss nestinggesturesclassnamesclonetoobjecttypescripttc39RegExp.prototype.flagsfastclonevestcoreenumerableeventDispatcheridleES2023callbindpositivereal-timeless mixinsimportPromisebufferstreamECMAScriptfpa11yECMAScript 2015gradients css3prefixsymboloncesortedlruregexpcryptostoragegatewaynopefetchiterateroute53lengthfast-cloneterminalintslibtddhandlercloudsearches2016less compilerexecfileredactECMAScript 2023slotpnpm9workflowzxinspectvalidationpropertywindowspasswordBigInt64ArrayES2021globalsbytestyled-componentsuninstallcompile lesssidecsssuperagentbrowserslistsequencetransportgloboptimizerfindclass-validatorESnextunicodearraysfindLastIndexfast-deep-copycomputed-typespopmotionstatus$.extendpluginchineseajvstylingcommand-lineelmArrayBuffer#slicejavascriptoptimistimportexportdataenvcurlcopyassigncompilerformatbinaryasterisksObject256es7walkdescriptorsfpsdirESArray.prototype.findLastenvironmentchromeECMAScript 5warningflatasciisetPrototypeOflinkharmonybundlermodulesintrinsicdeterministicshellCSSStyleDeclarationES2022vpcarrayshamindicatorequalityschemeajaxstyleguideapolloconcatES8springprogresscss variableutilsruntimediffdraglibphonenumberpreserve-symlinksnameslinuxcomparecolumnglobal objectgetintrinsicbabel-coredependencieswriteglobal this valuepinomapramdautil.inspectECMAScript 7YAMLl10nWebSockettranspilertrimStartsnsRxJSlocaltacitserializeES2017stylesspeedwhatwgcryptcreatepromisesymlinkiterationcore-jsparserString.prototype.matchAllspecdescriptorrulesglobalThishasjwttakefunction.lengthprivateisConcatSpreadablestyletelephoneprotocol-buffersreact-hooksclieslint-plugincloudformationpropertiesWeakSetlazytypeofchaiconcatMaptslocationwidthomitroutesignedownecmascriptrobustpredictablefull-widthlintpostcss-pluginmatchAllstaterdsReactiveExtensionsperformantworkspace:*colorscharactervalidatorshebangES2019utilityjestauthenticationmockpackage.jsontestingarktypejson-schema-validatorargumentdefinePropertybundlingwindowsuperstructStreamsqueueforkscheme-validationpoint-freeObject.isdropdirectoryObservableeventEmitterchildtypedarraytrimEndmulti-packageInt8Arrayhas-ownhelpersjsgroupES3zodcss-in-jstextObject.assignemitES2018toArrayweaksetcall-bindbootstrap lessebsnumberreadArray.prototype.flatquerystringchromiumbabelpackage managerES2020circularconsolerecursivesameValueZerocloudtrailArray.prototype.flattenECMAScript 6Int32ArraycommandserializationaststringifycoercibleconfigurableFloat64ArrayhttpthreegitignoreStreammodulees6posemonorepodeleteexpresseslintpluginlesscssdeepclonehothardlinksenvironmentsclientsimpledbexeces5timemockingfunctionalregexhttpsbddReactiveXagentHyBicallboundawsbinariesprivate dataoffsetcertificateshigher-orderreuseflatten
4.9.68

1 year ago

4.9.67

1 year ago

4.9.66

1 year ago

4.9.65

1 year ago

4.9.64

1 year ago

4.9.63

1 year ago

4.9.62

1 year ago

4.9.61

1 year ago

4.9.60

1 year ago

4.9.59

1 year ago

4.8.59

1 year ago

4.8.58

1 year ago

4.8.57

1 year ago

4.8.56

1 year ago

4.8.55

1 year ago

4.8.54

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

4.7.48

1 year ago

4.7.47

1 year ago

4.7.46

1 year ago

4.7.45

1 year ago

4.7.44

1 year ago

4.7.43

1 year ago

4.6.43

1 year ago

4.6.42

1 year ago

4.6.41

1 year ago

4.5.41

1 year ago

4.5.40

1 year ago

4.5.39

1 year ago

4.5.38

1 year ago

4.4.38

1 year ago

4.4.37

1 year ago

4.4.36

1 year ago

4.4.35

1 year ago

4.4.34

1 year ago

4.4.33

1 year ago

4.4.32

1 year ago

4.4.31

1 year ago

4.4.30

1 year ago

4.4.29

1 year ago

4.4.28

1 year ago

4.4.27

1 year ago

4.4.26

1 year ago

4.3.26

1 year ago

4.3.25

1 year ago

4.3.24

1 year ago

4.2.24

1 year ago

4.2.23

1 year ago

4.1.23

1 year ago

4.1.22

1 year ago

4.1.21

1 year ago

3.1.21

1 year ago

3.1.20

1 year ago

3.1.19

1 year ago

3.1.18

1 year ago

2.1.18

1 year ago

2.1.17

1 year ago

2.1.16

1 year ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.0.13

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

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