bubble-sort

Bubble sort

bubble-sort

Stability: 1 - Experimental

Bubble sort.

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