Wraps a one-parameter function, new function returns true if passed parameter is undefined, otherwise returns result of calling fn
fn
const optIsString = optional(isString); optIsString() //=> true optIsString({}) //=> false optIsString('str') //=> true
function to wrap
Generated using TypeDoc
Wraps a one-parameter function, new function returns true if passed parameter is undefined, otherwise returns result of calling
fn