Skip to content

Instantly share code, notes, and snippets.

View ababo's full-sized avatar
🏠
Working from home

Simon Golbert ababo

🏠
Working from home
View GitHub Profile
function flatten(arr) {
function _push_flat(obj, res) {
if (Array.isArray(obj)) {
for (var i in obj) {
push(obj[i], res);
}
} else {
res.push(obj);
}
}