# just-group-by

> return a grouped object from array

Latest version **2.2.0** (published 2022-12-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install just-group-by
pnpm add just-group-by
yarn add just-group-by
bun add just-group-by
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2022-12-17 |
| First published | 2020-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6192 |
| Author | Marc Balaban |
| Maintainers | angus-c |
| Keywords | array, groupby, no-dependencies, just |

## Links

- npm: https://www.npmjs.com/package/just-group-by
- Repository: https://github.com/angus-c/just
- Homepage: https://github.com/angus-c/just#readme
- Issues: https://github.com/angus-c/just/issues
- npm.io page: https://npm.io/package/just-group-by

## Recent versions

- 2.2.0 (latest) — 2022-12-17
- 2.1.2 — 2022-09-10
- 2.1.1 — 2022-08-08
- 2.1.0 — 2022-08-07
- 2.0.1 — 2021-11-13
- 2.0.0 — 2021-11-09
- 1.3.2 — 2021-11-02
- 1.3.1 — 2021-11-01
- 1.3.0 — 2021-10-31
- 1.2.0 — 2021-10-30
- 1.1.1 — 2021-05-03
- 1.1.0 — 2021-05-03
- 1.0.0 — 2020-02-20

## README

<!-- DO NOT EDIT THIS FILE! THIS FILE WAS AUTOGENERATED BY TEMPLATE-MATE -->
<!-- SEE https://github.com/angus-c/just/blob/master/CONTRIBUTING.md#readme-template -->

## just-group-by

Part of a [library](https://anguscroll.com/just) of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

[`🍦 Try it`](https://anguscroll.com/just/just-group-by)

```shell
npm install just-group-by
```
```shell
yarn add just-group-by
```

Return a grouped object from array

```js
import groupBy from 'just-group-by';

groupBy([6.1, 4.2, 6.3], Math.floor); // { '4': [4.2], '6': [6.1, 6.3] }
groupBy([1,2,3,4,5,6,7,8], function(i) { return i % 2}); // { '0': [2, 4, 6, 8], '1': [1, 3, 5, 7] }
```

---
_Source: https://npm.io/package/just-group-by · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
