• Creates a function that accepts up to one argument, ignoring any additional arguments.

    Type Parameters

    • T
    • TResult

    Parameters

    • func: ((arg1: T, ...args: any[]) => TResult)

      The function to cap arguments for.

    Returns ((arg1: T) => TResult)

    Returns the new function.

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