Avoid adding Function.prototype additions to _.

This commit is contained in:
John-David Dalton
2013-12-04 22:09:32 -08:00
parent 250fd71e16
commit c2972fcaa0
10 changed files with 72 additions and 44 deletions

View File

@@ -853,7 +853,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
@@ -3575,9 +3575,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 _
@@ -3589,6 +3590,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 index = -1,
@@ -4900,7 +4904,7 @@
/*--------------------------------------------------------------------------*/
// add functions to `lodash.prototype`
mixin(lodash);
mixin(assign({}, lodash));
/**
* The semantic version number.