up.util.evalOption(value, ...args)
JavaScript function
If the given value is a function, calls the function with the given args.
Otherwise it just returns value.
Example
up.util.evalOption(5) // => 5
let fn = () => 1 + 2
up.util.evalOption(fn) // result: 3
Parameters
value
required
Type: any
...args
required
Type: Array
Return value
Type: any