mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 10:19:24 +02:00
Also check the lang in case insensitive
This commit is contained in:
parent
33e7f7384e
commit
2a9630258f
22658 changed files with 3562773 additions and 3562767 deletions
66
node_modules/lodash/flattenDepth.js
generated
vendored
66
node_modules/lodash/flattenDepth.js
generated
vendored
|
@ -1,33 +1,33 @@
|
|||
var baseFlatten = require('./_baseFlatten'),
|
||||
toInteger = require('./toInteger');
|
||||
|
||||
/**
|
||||
* 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 {Array} Returns the new flattened array.
|
||||
* @example
|
||||
*
|
||||
* var array = [1, [2, [3, [4]], 5]];
|
||||
*
|
||||
* _.flattenDepth(array, 1);
|
||||
* // => [1, 2, [3, [4]], 5]
|
||||
*
|
||||
* _.flattenDepth(array, 2);
|
||||
* // => [1, 2, 3, [4], 5]
|
||||
*/
|
||||
function flattenDepth(array, depth) {
|
||||
var length = array == null ? 0 : array.length;
|
||||
if (!length) {
|
||||
return [];
|
||||
}
|
||||
depth = depth === undefined ? 1 : toInteger(depth);
|
||||
return baseFlatten(array, depth);
|
||||
}
|
||||
|
||||
module.exports = flattenDepth;
|
||||
var baseFlatten = require('./_baseFlatten'),
|
||||
toInteger = require('./toInteger');
|
||||
|
||||
/**
|
||||
* 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 {Array} Returns the new flattened array.
|
||||
* @example
|
||||
*
|
||||
* var array = [1, [2, [3, [4]], 5]];
|
||||
*
|
||||
* _.flattenDepth(array, 1);
|
||||
* // => [1, 2, [3, [4]], 5]
|
||||
*
|
||||
* _.flattenDepth(array, 2);
|
||||
* // => [1, 2, 3, [4], 5]
|
||||
*/
|
||||
function flattenDepth(array, depth) {
|
||||
var length = array == null ? 0 : array.length;
|
||||
if (!length) {
|
||||
return [];
|
||||
}
|
||||
depth = depth === undefined ? 1 : toInteger(depth);
|
||||
return baseFlatten(array, depth);
|
||||
}
|
||||
|
||||
module.exports = flattenDepth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue