This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/alphanum-sort
cranberry ed23347e56 Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
..
lib Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
LICENSE Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
README.md Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00
package.json Initial comission of TheLounge base files 2020-11-01 22:46:04 +00:00

README.md

alphanum-sort

Build Status

Alphanumeric sorting algorithm

Install

With npm do:

npm i alphanum-sort -S

Example

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