(input, shallow, output)
| 16095 | |
| 16096 | // Internal implementation of a recursive `flatten` function. |
| 16097 | var flatten = function(input, shallow, output) { |
| 16098 | each(input, function(value) { |
| 16099 | if (_.isArray(value)) { |
| 16100 | shallow ? push.apply(output, value) : flatten(value, shallow, output); |
| 16101 | } else { |
| 16102 | output.push(value); |
| 16103 | } |
| 16104 | }); |
| 16105 | return output; |
| 16106 | }; |
| 16107 | |
| 16108 | // Return a completely flattened version of an array. |
| 16109 | _.flatten = function(array, shallow) { |
no test coverage detected