NewDash

    Function ary

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

      Parameters

      • func: Function

        The function to cap arguments for.

      • n: any = func.length

        The arity cap.

      • Optionalguard: any

        Enables use as an iteratee for methods like map.

      Returns Function

      Returns the new capped function.

      5.5.0

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