/** * lodash 4.0.0 (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright 2012-2016 The Dojo Foundation * Based on Underscore.js 1.8.3 * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors * Available under MIT license */ var baseFlatten = require('lodash._baseflatten'); /** * Flattens `array` a single level. * * @static * @memberOf _ * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, 3, [4]]]); * // => [1, 2, 3, [4]] */ function flatten(array) { var length = array ? array.length : 0; return length ? baseFlatten(array) : []; } module.exports = flatten;