Skip to content

Instantly share code, notes, and snippets.

View warpgate3's full-sized avatar
🐤

m2sj warpgate3

🐤
View GitHub Profile
var sequenceGrouping = function (data) {
return _.reduce(data, function (arr, val, i, a) {
if (!i || val != a[i - 1] + 1) {
arr.push([]);
}
arr[arr.length - 1].push(val);
return arr;