README
smart-sort
sort Array in a natural way
Native sort
['a2', 'a11', 'a1'].sort()
// ["a1", "a11", "a2"]
Generally, we want ['a1', 'a2', 'a11'].And this is what our library will do it for you.
API
SmartSort.naturalSort(list, [caseInsensitive = true], [order = 'desc'])
sort Array
SmartSort.naturalSortBy(list, field, [caseInsensitive = true], [order = 'desc'])
sort Array
Module support
AMD / CommonJS / UMD
IE Support
IE9+ / NodeJS
IE < 9 brwoser needs es5-shim