Flattens a nested array. If isShallow is truthy, array will only be flattened a single level.
$ component install esundahl/flatten
var flatten = require('flatten');
var arr = [[1,2],[3,[4,5]],6,7,[[8],[9,10]]];
flatten(arr) // => [1,2,3,4,5,6,7,8,9,10]
flatten(arr, true); // => [1,2,3,[4,5],6,7,[8],[9,10]]
MIT