This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/alphanum-sort/README.md
2019-08-11 20:48:02 +02:00

45 lines
808 B
Markdown

# alphanum-sort
[![Build Status](https://travis-ci.org/TrySound/alphanum-sort.svg?branch=master)](https://travis-ci.org/TrySound/alphanum-sort)
> Alphanumeric sorting algorithm
## Install
With [npm](https://npmjs.org/package/alphanum-sort) do:
```
npm i alphanum-sort -S
```
## Example
```js
var sort = require('alphanum-sort');
var result = sort(['item20', 'item19', 'item1', 'item10', 'item2']);
// ['item1', 'item2', 'item10', 'item19', 'item20']
```
## API
### alphanumSort(array, options)
#### options
##### insensitive
Type: `Boolean`
Default: `false`
Compares items case insensitively
##### sign
Type: `Boolean`
Default: `false`
Allows `+` and `-` characters before numbers
## License
MIT © [Bogdan Chadkin](https://github.com/trysound)