natural-sort-lx
v1.0.1
Published
Sort criteria function that sorts strings in a natural order i.e. treats numbers in their numeric order.
Downloads
2
Maintainers
Readme
natural-sort
Sort criteria function that sorts strings in a natural order i.e. treats numbers in their numeric order.
##usage
var naturalsort = require('natural-sort-lx');
var strings = ['d', 'c', 'a11', 'a2'];
strings.sort(naturalsort);
console.log(strings);
// output: ['a2', 'a11', 'c', 'd']