Another implementation of array flatterization. Works recursivly down every nested array.
var flat = require('flatit');
flat([]); // []
flat([1,2,3,4,5]); // [1,2,3,4,5]
flat([1,2,3,[],4,5]); // [1,2,3,4,5]
flat([1,2,3,[4,[5],6],7,8]); // [1,2,3,4,5,6,7,8]
Returns flattened array.
Run npm run bench
to test it yourself.
MIT (c) 2014 Vsevolod Strukchinsky ([email protected])