1.0.4 • Published 12 days ago

@teamteanpm2024/recusandae-error-minus v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

@teamteanpm2024/recusandae-error-minus 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 @teamteanpm2024/recusandae-error-minus

Usage/Examples

var groupBy = require('@teamteanpm2024/recusandae-error-minus');
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('@teamteanpm2024/recusandae-error-minus');
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('@teamteanpm2024/recusandae-error-minus');
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

callthrottlechildisConcatSpreadableassertsfastclonewidthxhrcachequerystringwalkrmastfullwidthinferencetypesbinddragpicomatchlintfetchreducestylesbatchobjectcall-bounddomtouchrequirewgetcmdeditoremitextensionqsargumentserializationes-shim APIframeworkchineseconnectBigUint64Arrayinternal slotiteratorwritablecjkcontainsmapidreuseObject.definePropertypackagesloggerglobSymbol.toStringTagObject.istelephoneshammkdiruuidtestsymbolsObservabledescriptorsstylesheetoutputpipepolyfillfseventseslintconfigimportbusyreact-hook-formES8functionalHyBi3djsonschemaarktypeTypeBoxbreakcoerciblejQuerya11yfunctionpersistentES2019lengthimmutablejavascriptObject.keystapbrowserlistCSSStyleDeclarationreact-hooksfast-copyxdgzeroaccessibilitygraphqlECMAScript 2022dropiterateminimalStyleSheetinspectdeep-clonewaapivalidstarterarrayshebanguser-streamsremovelessinternalfindrm -rfpackageStreampnpm9flatYAMLopensshrinkwrapmacoscsscryptosetPrototypeOfvariablesclassestc39httpextendsafecore-jsrandomfast-deep-copysymlinksconcurrencyestreeoperating-systemrobustreadablestreamworkspace:*String.prototype.matchAllsanitizationspinnerreadterminalutilityscheme-validationrmdirentriespackage.jsonstringifierprunevariables in cssinstallergenericsgetgradients cssfile systemlazyfunctionsRegExp#flagsstreamseslintpluginfixed-widthRx_.extendcharactermulti-packageyupreact-testing-libraryappposeletlesscssformatsomelinkframertypepoint-freecallboundargsxssmoveECMAScript 6ESnextharmonymixinsconstregexpositiveflagsettingsdeepcopydom-testing-librarycollection.es6css-in-jsgetoptmomentflattenjsonIteratorES2015ecmascripteventDispatcherdeepclonetrimRighthigher-orderargumentswordwrapECMAScript 5ES2020validatorenvfilevestkeyshardlinksjoiStreamsassertionpromisesjsxhasArrayBuffer#sliceoptionperformancejapaneselasttypanioncryptECMAScript 2021nodejsMaptoStringTaghashBigInt64Arrayutil.inspectuninstallansijsjson-schemavisualvalidateeventsquoteincludesstringES3ajaxESguidpushprotoutilsstyleObject.getPrototypeOfchromegroupByenderclideepwatcherspringlimitequalitymimeRegExp.prototype.flagsslicees-shimswordbreakdeterministicnativemetadatarangeerrorzodindicatorarraybufferfastifycompilersortless.jsmodulescharactersTypeScriptsideWebSocketscodesmime-dbsetImmediateoptimist256private dataform-validationexeregular expressionsformsponyfillnodetoobjectdirectoryprotocol-buffers
1.0.2

14 days ago

1.0.4

12 days ago

1.0.3

13 days ago

1.0.1

15 days ago

1.0.0

15 days ago