ary

Function
since 3.0.0

Arguments

  • Function The function to cap arguments for.
  • number The arity cap.

Returns

Function the new capped function.

Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.

Example of Lodash _.ary

_.map(['6', '8', '10'], _.ary(parseInt, 1));
// => [6, 8, 10]