From 70b782c7e76085c6d9a88f5c72c274e511dc93d8 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 16 Mar 2014 18:08:39 -0700 Subject: [PATCH] Use the argument `predicate` instead of `func` for `_.negate`. --- lodash.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lodash.js b/lodash.js index c8ce4929c..69955ce12 100644 --- a/lodash.js +++ b/lodash.js @@ -5220,13 +5220,14 @@ } /** - * Creates a function that negates the result of `func`. The `func` function - * is executed with the `this` binding and arguments of the created function. + * Creates a function that negates the result of the predicate `func`. The + * `func` function is executed with the `this` binding and arguments of the + * created function. * * @static * @memberOf _ * @category Functions - * @param {Function} func The function to negate. + * @param {Function} predicate The predicate to negate. * @returns {Function} Returns the new function. * @example * @@ -5237,12 +5238,12 @@ * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); * // => [1, 3, 5] */ - function negate(func) { - if (!isFunction(func)) { + function negate(predicate) { + if (!isFunction(predicate)) { throw new TypeError; } return function() { - return !func.apply(this, arguments); + return !predicate.apply(this, arguments); }; }