# group-by-category

> group by with javascript

Latest version **1.0.5** (published 2022-05-31) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-05-31 |
| First published | 2022-05-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ekremtinas |
| Maintainers | ekremtinas |

## Links

- npm: https://www.npmjs.com/package/group-by-category
- Repository: https://github.com/ekremtinas/GroupByCategory
- Homepage: https://github.com/ekremtinas/GroupByCategory#readme
- Issues: https://github.com/ekremtinas/GroupByCategory/issues
- npm.io page: https://npm.io/package/group-by-category

## Recent versions

- 1.0.5 (latest) — 2022-05-31
- 1.0.4 — 2022-05-31
- 1.0.3 — 2022-05-31
- 1.0.2 — 2022-05-31
- 1.0.1 — 2022-05-31
- 1.0.0 — 2022-05-31

## README

# GroupByCategory
group by  with Javascript


#usage

```javascript
const groupByCategoryFormatted=require('group-by-category');
let PureArray = [{key:1,value:'Fenerbahçe'},{key:2,value:'Fenerbahçe'},{key:3,value:'Neşet Ertaş'}];
const ExampleArray=groupByCategoryFormatted(PureArray,'value')
[
   {
        value: "Fenerbahçe",
        array: [
            {
                key: 1,
                value: "Fenerbahçe"
            },
            {
                key: 2,
                value: "Fenerbahçe"
            }
        ]
    },
    {
        value: "Neşet Ertaş",
        array: [
            {
                key: 3,
                value: "Neşet Ertaş"
            }
        ]
    }
]
ex:ExampleArray.find(item=>item.value=="Fenerbahçe").array



const ExampleArrayKey =groupByCategoryFormatted(PureArray,'key')
[
    {
        key: 1,
        array: [
            {
                key: 1,
                value: "Fenerbahçe"
            }
        ]
    },
    {
        key: 2,
        array: [
            {
                key: 2,
                value: "Fenerbahçe"
            }
        ]
    },
    {
        key: 3,
        array: [
            {
                key: 3,
                value: "Neşet Ertaş"
            }
        ]
    }
]
ex:ExampleArrayKey.find(item=>item.key==1).array
```

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