CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes45downloads
flatten.js23 linesDownload Raw Back to lodash
1var baseFlatten = require('./_baseFlatten');2 3/**4 * Flattens `array` a single level deep.5 *6 * @static7 * @memberOf _8 * @since 0.1.09 * @category Array10 * @param {Array} array The array to flatten.11 * @returns {Array} Returns the new flattened array.12 * @example13 *14 * _.flatten([1, [2, [3, [4]], 5]]);15 * // => [1, 2, [3, [4]], 5]16 */17function flatten(array) {18  var length = array == null ? 0 : array.length;19  return length ? baseFlatten(array, 1) : [];20}21 22module.exports = flatten;23 
basant307/AI_Governance_Project · CoolFace