# sortbyfrequency

> Sort an array based on the Frequency of the elements

Latest version **1.0.11** (published 2020-01-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install sortbyfrequency
pnpm add sortbyfrequency
yarn add sortbyfrequency
bun add sortbyfrequency
```

## 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.11 |
| Published | 2020-01-04 |
| First published | 2019-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Naresh |
| Maintainers | naresh1105 |
| Keywords | npm, node_modules, sorting, frequency |

## Links

- npm: https://www.npmjs.com/package/sortbyfrequency
- Repository: https://github.com/NareshMurthy/Sort-By-Frequency
- Homepage: https://github.com/NareshMurthy/Sort-By-Frequency#readme
- Issues: https://github.com/NareshMurthy/Sort-By-Frequency/issues
- npm.io page: https://npm.io/package/sortbyfrequency

## Recent versions

- 1.0.11 (latest) — 2020-01-04
- 1.0.10 — 2020-01-02
- 1.0.9 — 2020-01-02
- 1.0.8 — 2020-01-02
- 1.0.7 — 2019-07-08
- 1.0.6 — 2019-07-08
- 1.0.5 — 2019-07-08
- 1.0.4 — 2019-07-08
- 1.0.3 — 2019-07-08
- 1.0.2 — 2019-07-08
- 1.0.1 — 2019-07-08
- 1.0.0 — 2019-07-08

## README

# Sort an array by the frequency of elements

[![License](https://img.shields.io/npm/l/sortbyfrequency.svg?style=for-the-badge)](https://www.npmjs.com/package/sortbyfrequency)
[![NPM Downloads](https://img.shields.io/npm/dt/sortbyfrequency.svg?style=for-the-badge)](https://www.npmjs.com/package/sortbyfrequency)

### Installing

```shell
npm i sortbyfrequency;
```

### Importing

```js
import sortByFrequency from "sortbyfrequency"; //ES6
const sortByFrequency = require("sortbyfrequency"); //JS
```

### Usage:

```js
import sortByFrequency from "sortbyfrequency"; //ES6
const sortByFrequency = require("sortbyfrequency"); //JS
let sorted = sortByFrequency(["a", "b", "b", "c", "b", "a"]);
console.log(sorted); //['b', 'a', 'c']
```

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