alphanum-sort
Alphanumeric sorting algorithm
Last updated 9 years ago by trysound .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install alphanum-sort 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.2                                ...           latest (9 years ago)

3 Versions

  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 6
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)

© 2010 - cnpmjs.org x YWFE | Home | YWFE