Array flatten
functionality in JavaScript. Used functional way of solving this task and it gives really cool performance (more than 2 times faster than setting as an Array
method).
Here are unit and performance tests which are given in this gist also. For online view, see unit and performance tests on RequireBin (please check console for results). They are compared against lodash.flattendeep
solution.
The code syntax is based on ES6 and Standard.