@newdash/newdash
Version:
javascript/typescript utility library
20 lines (19 loc) • 537 B
TypeScript
/**
* Creates a function that invokes `func`, with up to `n` arguments,
* ignoring any additional arguments.
*
* @since 5.5.0
* @category Function
* @param func The function to cap arguments for.
* @param n The arity cap.
* @param guard Enables use as an iteratee for methods like `map`.
* @returns Returns the new capped function.
* @example
*
* ```js
* map(['6', '8', '10'], ary(parseInt, 1));
* // => [6, 8, 10]
* ```
*/
export declare function ary(func: Function, n?: any, guard?: any): Function;
export default ary;