# finder-sort

> Sort file names in order meaningful for humans (inspired by OSX Finder)

Latest version **0.3.3** (published 2023-03-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install finder-sort
pnpm add finder-sort
yarn add finder-sort
bun add finder-sort
```

## Health

**Score 35/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.3.3 |
| Published | 2023-03-07 |
| First published | 2019-01-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tomasz Wegrzanowski |
| Maintainers | t-a-w |
| Keywords | sort, finder |

## Links

- npm: https://www.npmjs.com/package/finder-sort
- Repository: https://github.com/taw/finder-sort
- Homepage: https://github.com/taw/finder-sort#readme
- Issues: https://github.com/taw/finder-sort/issues
- npm.io page: https://npm.io/package/finder-sort

## Recent versions

- 0.3.3 (latest) — 2023-03-07
- 0.3.2 — 2023-03-07
- 0.3.1 — 2023-03-07
- 0.3.0 — 2019-12-27
- 0.2.0 — 2019-12-17
- 0.1.0 — 2019-01-04

## README

Sort file names in order meaningful for humans (inspired by OSX Finder).

So `cat9.jpg` comes before `cat10.jpg`, it's case insensitive except as tie-breaker, is aware of multi-part paths and so on.

### Installation

```
    npm install finder-sort
```

### Usage

```
    import finderSort from "finder-sort";

    finderSort(arrayOfFiles);
```

For more complex scenacios, you can pass key function as second argument.
For example if you want to sort array of objects by their `fileName` property, you can do:

```
    import finderSort from "finder-sort";

    finderSort(arrayOfObjects, (obj) => obj.fileName);
```

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