heap-sort

Heap sort

heap-sort

Stability: 1 - Experimental

Heap sort.

var heapSort = require('heap-sort');
...
var ascending  = heapSort(array);        // sort ascending 
var descending = heapSort(array, false); // sort descending