Options
All
  • Public
  • Public/Protected
  • All
Menu

Module ary

Index

References

Functions Function

References

Renames and re-exports ary

Function Functions

  • ary(func: Function, n?: any, guard?: any): Function
  • Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.

    since

    5.5.0

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

    Parameters

    • func: Function

      The function to cap arguments for.

    • n: any = func.length

      The arity cap.

    • Optional guard: any

      Enables use as an iteratee for methods like map.

    Returns Function

    Returns the new capped function.