MCPcopy Index your code
hub / github.com/deployd/deployd / flattenDepth

Function flattenDepth

test-app/public/sinon.js:17996–18003  ·  view source on GitHub ↗

* Recursively flatten `array` up to `depth` times. * * @static * @memberOf _ * @since 4.4.0 * @category Array * @param {Array} array The array to flatten. * @param {number} [depth=1] The maximum recursion depth. * @returns {Arra

(array, depth)

Source from the content-addressed store, hash-verified

17994 * // => [1, 2, 3, [4], 5]
17995 */
17996 function flattenDepth(array, depth) {
17997 var length = array == null ? 0 : array.length;
17998 if (!length) {
17999 return [];
18000 }
18001 depth = depth === undefined ? 1 : toInteger(depth);
18002 return baseFlatten(array, depth);
18003 }
18004
18005 /**
18006 * The inverse of `_.toPairs`; this method returns an object composed

Callers

nothing calls this directly

Calls 2

toIntegerFunction · 0.85
baseFlattenFunction · 0.85

Tested by

no test coverage detected