Creates a function that accepts up to one argument, ignoring any additional arguments.
The type of the function.
The function to cap arguments for.
Returns the new capped function.
Rest
function fn(a, b, c) { console.log(arguments);}unary(fn)(1, 2, 3); // [Arguments] { '0': 1 } Copy
function fn(a, b, c) { console.log(arguments);}unary(fn)(1, 2, 3); // [Arguments] { '0': 1 }
Alias