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

    Parameters

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

      The function to cap arguments for.

    • Optionaln: number

      The arity cap.

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

    Returns the new function.