1.0.6 • Published 7 years ago
flatible v1.0.6
flatible
Iterate recursively on a multi-dimensional array
Usage
const flatible = require('flatible');
const someArray = [["one", ["two", [3, "FOUR"]]], 5];
for (let someValue of flatible(someArray)) {
console.log(someValue);
}
Output:
one
two
3
FOUR
5