merge-sort

Merge sort

merge-sort

Stability: 1 - Experimental

Merge sort.

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

yes, the descending case is sort of crappy usage, I doubt anyone will use this code though :)