Sha256: c245f405061e1150f378ff297530e932970ba853dfc1bb230a5f8af919ffb036

Contents?: true

Size: 577 Bytes

Versions: 264

Compression:

Stored size: 577 Bytes

Contents

var baseFlatten = require('./_baseFlatten');

/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;

/**
 * Recursively flattens `array`.
 *
 * @static
 * @memberOf _
 * @since 3.0.0
 * @category Array
 * @param {Array} array The array to flatten.
 * @returns {Array} Returns the new flattened array.
 * @example
 *
 * _.flattenDeep([1, [2, [3, [4]], 5]]);
 * // => [1, 2, 3, 4, 5]
 */
function flattenDeep(array) {
  var length = array == null ? 0 : array.length;
  return length ? baseFlatten(array, INFINITY) : [];
}

module.exports = flattenDeep;

Version data entries

264 entries across 262 versions & 29 rubygems

Version Path
guard-sass-lint-0.1.2 node_modules/lodash/flattenDeep.js
guard-sass-lint-0.1.1 node_modules/lodash/flattenDeep.js
lanes-0.8.0 node_modules/lodash/flattenDeep.js
lanes-0.8.0 node_modules/globule/node_modules/lodash/flattenDeep.js