mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Add doc note to _.zip about unzipping values. [ci skip] [closes #418]
This commit is contained in:
12
lodash.js
12
lodash.js
@@ -1803,7 +1803,7 @@
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized, this method returns the custom method, otherwise it returns
|
||||
* customized this method returns the custom method, otherwise it returns
|
||||
* the `baseIndexOf` function.
|
||||
*
|
||||
* @private
|
||||
@@ -5411,9 +5411,10 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of grouped elements, the first of which contains the first
|
||||
* elements of the given arrays, the second of which contains the second
|
||||
* elements of the given arrays, and so on.
|
||||
* Creates an array of grouped elements, the first of which contains the
|
||||
* first elements of the given arrays, the second of which contains the second
|
||||
* elements of the given arrays, and so on. If a zipped value is provided its
|
||||
* corresponding unzipped value will be returned.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
@@ -5425,6 +5426,9 @@
|
||||
*
|
||||
* _.zip(['fred', 'barney'], [30, 40], [true, false]);
|
||||
* // => [['fred', 30, true], ['barney', 40, false]]
|
||||
*
|
||||
* _.unzip([['fred', 30, true], ['barney', 40, false]]);
|
||||
* // => [['fred', 'barney'], [30, 40], [true, false]]
|
||||
*/
|
||||
function zip() {
|
||||
var array = arguments.length > 1 ? arguments : arguments[0],
|
||||
|
||||
Reference in New Issue
Block a user