An open API service indexing awesome lists of open source software.

https://github.com/denq/via-sort

This package is a convenient wrapper for most standard sorting methods. Such as quickSort, mergeSort and others.
https://github.com/denq/via-sort

algorithm-library heapsort npm performance quicksort selectionsort sorting-algorithms

Last synced: 7 months ago
JSON representation

This package is a convenient wrapper for most standard sorting methods. Such as quickSort, mergeSort and others.

Awesome Lists containing this project

README

          

# via-sort

This package is a convenient wrapper for most standard sorting methods. Such as quickSort, mergeSort and others.

### How to use?
```
var array = [2, 3, 1, 2, 6, 5];
var sortedArray = viaSort('quick', array);
console.log(sortedArray) // [1, 2, 2, 3, 5, 6]
```

### Where to use it?
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

### TDD
```
npm test
```

#### Community
I will be glad your `pull requests`