This package is a convenient wrapper for most standard sorting methods. Such as quickSort, mergeSort and others
npm install via-sortThis package is a convenient wrapper for most standard sorting methods. Such as quickSort, mergeSort and others.
var array = [2, 3, 1, 2, 6, 5];
var sortedArray = viaSort('quick', array);
console.log(sortedArray) // [1, 2, 2, 3, 5, 6]
`$3
Standard method .sort() significantly slower quickSort.
To check it out there is a script
`
node performance/index.js
`
output
`
10 'native sort method'
85 'insertion'
4 'quick'
14 'merge'`
Where time described in milliseconds$3
`
npm test
`#### Community
I will be glad your
pull requests`