$ gnpm install num-sort
Sort an array of numbers
$ npm install num-sort
import {numberSortAscending} from 'num-sort';
[9, -3, -Infinity, 24, NaN].sort(numberSortAscending);
//=> [NaN, -Infinity, -3, 9, 24]
Ascending sort comparator.
Descending sort comparator.
Copyright 2013 - present © cnpmjs.org | Home |