Remove guard params.

This commit is contained in:
John-David Dalton
2017-03-05 02:37:18 -08:00
parent 89829331f0
commit bda6d56c60
14 changed files with 22 additions and 41 deletions

4
ary.js
View File

@@ -11,15 +11,13 @@ const WRAP_ARY_FLAG = 128
* @category Function
* @param {Function} func The function to cap arguments for.
* @param {number} [n=func.length] The arity cap.
* @param- {Object} [guard] Enables use as an iteratee for methods like `map`.
* @returns {Function} Returns the new capped function.
* @example
*
* map(['6', '8', '10'], ary(parseInt, 1))
* // => [6, 8, 10]
*/
function ary(func, n, guard) {
n = guard ? undefined : n
function ary(func, n) {
n = (func && n == null) ? func.length : n
return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n)
}