# natural-sort-by-key

> Sort array of objects by natural, human, alphanumeric order. Natural sort order is an ordering of strings in alphabetical order, except that multi-digit numbers are ordered as a single character.

Latest version **2.2.0** (published 2022-07-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install natural-sort-by-key
pnpm add natural-sort-by-key
yarn add natural-sort-by-key
bun add natural-sort-by-key
```

## 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 | 2.2.0 |
| Published | 2022-07-02 |
| First published | 2017-11-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 34.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | fantasyui.com |
| Maintainers | fantasyui.com |
| Keywords | natural, human, alphanumeric, sort |

## Links

- npm: https://www.npmjs.com/package/natural-sort-by-key
- Repository: https://github.com/fantasyui-com/natural-sort-by-key
- Homepage: https://github.com/fantasyui-com/natural-sort-by-key#readme
- Issues: https://github.com/fantasyui-com/natural-sort-by-key/issues
- npm.io page: https://npm.io/package/natural-sort-by-key

## Dependencies (1)

- [natural-compare](https://npm.io/package/natural-compare.md) ^1.4.0

## Recent versions

- 2.2.0 (latest) — 2022-07-02
- 2.1.0 — 2021-09-18
- 2.0.2 — 2020-04-18
- 2.0.1 — 2020-04-18
- 1.1.1 — 2020-04-18
- 1.1.0 — 2019-04-23
- 1.0.1 — 2017-11-14

## README

# natural-sort-by-key
Sort array of objects by natural, human, alphanumeric order. Natural sort order is an ordering of strings in alphabetical order, except that multi-digit numbers are ordered as a single character.

    $> npm i natural-sort-by-key

    const byKey = require('natural-sort-by-key');
    list.sort( byKey('flarp') )

Where list is an array of objects

    let list = [
      {flarp: '10 Baz'},
      {flarp: '100 Baz'},
      {flarp: '20 Baz'},
    ]

More at [Wikipedia](https://en.wikipedia.org/wiki/Natural_sort_order)

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