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

14
dist/lodash.compat.js vendored
View File

@@ -1786,7 +1786,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
@@ -5394,9 +5394,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 _
@@ -5408,6 +5409,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],
@@ -6950,7 +6954,7 @@
lodash.unzip = zip;
// add functions to `lodash.prototype`
mixin(lodash);
mixin(assign({}, lodash));
/*--------------------------------------------------------------------------*/