I hereby claim:
- I am hugomarisco on github.
- I am hugomarisco (https://keybase.io/hugomarisco) on keybase.
- I have a public key ASDM7vPBIKD_OZC93GrfermMDadnNeY6D4dL58Bo52EuPAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function flattenArr(arr) { | |
if (!Array.isArray(arr)) throw new TypeError('First argument must be an Array'); | |
return flatten(arr, []); | |
} | |
function flatten(arr, res) { | |
if (Array.isArray(arr)) { | |
arr.forEach((el) => flatten(el, res)); | |
} else { |