Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-12-16 17:53:20 -08:00
parent 94d714007e
commit 8c26e6fd4c
656 changed files with 16423 additions and 11602 deletions

22
flatten.js Normal file
View File

@@ -0,0 +1,22 @@
define(['./internal/baseFlatten'], function(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) : [];
}
return flatten;
});