Plato on Github
Report Home
node_modules/es5-ext/array/#/flatten.js
Maintainability
82.67
Lines of code
12
Difficulty
8.80
Estimated Errors
0.09
Function weight
By Complexity
By SLOC
'use strict'; var isArray = Array.isArray, forEach = Array.prototype.forEach , push = Array.prototype.push; module.exports = function flatten() { var r = []; forEach.call(this, function (x) { push.apply(r, isArray(x) ? flatten.call(x) : [x]); }); return r; };