@nozbe/watermelondb
Version:
Build powerful React Native and React web apps that scale from hundreds to tens of thousands of records and remain fast
19 lines (17 loc) • 372 B
JavaScript
;
exports.__esModule = true;
exports.default = unnest;
// inspired by ramda and rambda
/* eslint-disable */
function unnest(arr) {
var result = [];
for (var i = 0, l = arr.length; i < l; i++) {
var value = arr[i];
if (Array.isArray(value)) {
result = result.concat(value);
} else {
result.push(value);
}
}
return result;
}