You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Björn
b963b3396c
|
4 years ago | |
---|---|---|
.. | ||
lib | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
package.json | 4 years ago |
README.md
alphanum-sort
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