• Creates a function that accepts up to n arguments ignoring any additional arguments.

    Parameters

    • func: ((...args: any[]) => any)

      The function to cap arguments for.

        • (...args): any
        • Parameters

          • Rest...args: any[]

          Returns any

    • Optionaln: number

      The arity cap.

    Returns ((...args: any[]) => any)

    Returns the new function.

      • (...args): any
      • Parameters

        • Rest...args: any[]

        Returns any