mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Doc tweaks to _.flatten and other methods. [ci skip]
This commit is contained in:
39
lodash.js
39
lodash.js
@@ -3032,18 +3032,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flattens a nested array (the nesting can be to any depth). If `isShallow`
|
* Flattens a nested array. If `isDeep` is `true` the array is recursively
|
||||||
* is truthy, the array is only flattened a single level. If a callback is
|
* flattened, otherwise it is only flattened a single level.
|
||||||
* provided each element of the array is passed through the callback before
|
|
||||||
* flattening. The callback is bound to `thisArg` and invoked with three
|
|
||||||
* arguments; (value, index, array).
|
|
||||||
*
|
|
||||||
* If a property name is provided for `callback` the created "_.pluck" style
|
|
||||||
* callback returns the property value of the given element.
|
|
||||||
*
|
|
||||||
* If an object is provided for `callback` the created "_.where" style callback
|
|
||||||
* returns `true` for elements that have the properties of the given object,
|
|
||||||
* else `false`.
|
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
@@ -3291,8 +3281,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes elements from `array` corresponding to the specified indexes and
|
* Removes elements from `array` corresponding to the specified indexes and
|
||||||
* returns an array of removed elements. Indexes may be specified as an array
|
* returns an array of the removed elements. Indexes may be specified as an
|
||||||
* of indexes or as individual arguments.
|
* array of indexes or as individual arguments.
|
||||||
*
|
*
|
||||||
* Note: Unlike `_.at`, this method mutates `array`.
|
* Note: Unlike `_.at`, this method mutates `array`.
|
||||||
*
|
*
|
||||||
@@ -3320,8 +3310,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all elements from `array` that the predicate returns truthy for
|
* Removes all elements from `array` that the predicate returns truthy for
|
||||||
* and returns an array of removed elements. The predicate is bound to `thisArg`
|
* and returns an array of the removed elements. The predicate is bound to
|
||||||
* and invoked with three arguments; (value, index, array).
|
* `thisArg` and invoked with three arguments; (value, index, array).
|
||||||
*
|
*
|
||||||
* If a property name is provided for `predicate` the created "_.pluck" style
|
* If a property name is provided for `predicate` the created "_.pluck" style
|
||||||
* callback returns the property value of the given element.
|
* callback returns the property value of the given element.
|
||||||
@@ -5471,9 +5461,12 @@
|
|||||||
* @param {Function} func The function to debounce.
|
* @param {Function} func The function to debounce.
|
||||||
* @param {number} wait The number of milliseconds to delay.
|
* @param {number} wait The number of milliseconds to delay.
|
||||||
* @param {Object} [options] The options object.
|
* @param {Object} [options] The options object.
|
||||||
* @param {boolean} [options.leading=false] Specify execution on the leading edge of the timeout.
|
* @param {boolean} [options.leading=false] Specify execution on the leading
|
||||||
* @param {number} [options.maxWait] The maximum time `func` is allowed to be delayed before it's called.
|
* edge of the timeout.
|
||||||
* @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout.
|
* @param {number} [options.maxWait] The maximum time `func` is allowed to be
|
||||||
|
* delayed before it is called.
|
||||||
|
* @param {boolean} [options.trailing=true] Specify execution on the trailing
|
||||||
|
* edge of the timeout.
|
||||||
* @returns {Function} Returns the new debounced function.
|
* @returns {Function} Returns the new debounced function.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -5878,8 +5871,10 @@
|
|||||||
* @param {Function} func The function to throttle.
|
* @param {Function} func The function to throttle.
|
||||||
* @param {number} wait The number of milliseconds to throttle executions to.
|
* @param {number} wait The number of milliseconds to throttle executions to.
|
||||||
* @param {Object} [options] The options object.
|
* @param {Object} [options] The options object.
|
||||||
* @param {boolean} [options.leading=true] Specify execution on the leading edge of the timeout.
|
* @param {boolean} [options.leading=true] Specify execution on the leading
|
||||||
* @param {boolean} [options.trailing=true] Specify execution on the trailing edge of the timeout.
|
* edge of the timeout.
|
||||||
|
* @param {boolean} [options.trailing=true] Specify execution on the trailing
|
||||||
|
* edge of the timeout.
|
||||||
* @returns {Function} Returns the new throttled function.
|
* @returns {Function} Returns the new throttled function.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
@@ -8410,7 +8405,7 @@
|
|||||||
/**
|
/**
|
||||||
* Produces a random number between `min` and `max` (inclusive). If only one
|
* Produces a random number between `min` and `max` (inclusive). If only one
|
||||||
* argument is provided a number between `0` and the given number is returned.
|
* argument is provided a number between `0` and the given number is returned.
|
||||||
* If `floating` is truthy, or either `min` or `max` are floats, a floating-point
|
* If `floating` is `true`, or either `min` or `max` are floats, a floating-point
|
||||||
* number is returned instead of an integer.
|
* number is returned instead of an integer.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
|
|||||||
Reference in New Issue
Block a user