# unisort

> Extension for sort() to include Non-Latin alphabets into the sort algorithm instead of listing each alphabet after one another.

Latest version **1.1.0** (published 2022-01-20) · ISC license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2022-01-20 |
| First published | 2021-12-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jonas Müller-Laackman |
| Maintainers | jomula |
| Keywords | js, nls, sort, arabic, nonlatin, javascript, alphabet |

## Links

- npm: https://www.npmjs.com/package/unisort
- Repository: https://github.com/Closing-the-Gap-in-NLS-DH/unisort
- Homepage: https://github.com/Closing-the-Gap-in-NLS-DH/unisort#readme
- Issues: https://github.com/Closing-the-Gap-in-NLS-DH/unisort/issues
- npm.io page: https://npm.io/package/unisort

## Dependencies (2)

- [chai](https://npm.io/package/chai.md) ^4.3.4
- [mocha](https://npm.io/package/mocha.md) ^9.1.3

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2022-01-20
- 1.0.5 — 2021-12-17
- 1.0.4 — 2021-12-17
- 1.0.2 — 2021-12-17
- 1.0.1 — 2021-12-17
- 1.0.0 — 2021-12-17

## README

[![DOI](https://zenodo.org/badge/439264830.svg)](https://zenodo.org/badge/latestdoi/439264830)

uniSort
=======

A simple and expandable extension for JavaScript's sort() method to provide an integrative sorting result that includes non-latin alphabets, instead of just adding them at the end. 

# Installation

`npm install unisort`

## Usage

```javascript
import uniSort from 'unisort';

const alphabetUnsorted = ['A','B','ط','D','ا'];
const namesUnsorted = ['Alfred', 'Ben', 'طارق', 'Daniel', 'احمد', 'Yvonne'];

uniSort(alphabetUnsorted) // ['A', 'ا', 'B', 'D', 'ط']
uniSort(namesUnsorted) // ['احمد', 'Alfred', 'Ben', 'Daniel', 'طارق', 'Yvonne']
```

## Test

`npm test`

## Contribution

Right now, the extension does only include the Arabic alphabet. It is planned to add more non-latin alphabets (e.g. Hebrew, Farsi, Tamazight, Syriac), however, feel free to contribute by adding an alphabet of your choice.
Please be sure to also add tests for each alphabet you add. Before committing, please test and lint your code according to AirBnb codestyle.

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