MCPcopy Index your code
hub / github.com/josdejong/mathjs / _flatten

Function _flatten

src/utils/array.js:489–498  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

487 return flat
488
489 function _flatten (array) {
490 for (let i = 0; i < array.length; i++) {
491 const item = array[i]
492 if (Array.isArray(item)) {
493 _flatten(item)
494 } else {
495 flat.push(item)
496 }
497 }
498 }
499
500 function _flattenRectangular (array) {
501 if (Array.isArray(array[0])) {

Callers 1

flattenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…