I believe this can be covered by lodash _.partition
:
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9];
var [odds, evens] = _.partition(arr, function(n) {
return n % 2;
});
console.log(_.concat(odds, evens));
Or even shorter:
_.groupBy(arr, function(n) {return (n % 2) ? 'odd' : 'even';})