heap-sort Stability: 1 - Experimental Heap sort. Usage var heapSort = require('heap-sort'); ... var ascending = heapSort(array); // sort ascending var descending = heapSort(array, false); // sort descending