Edit this page

up.util up.util.evalOption(value, ...args)
JavaScript function

This feature is experimental. It may be changed or removed in a future version.

If the given value is a function, calls the function with the given args. Otherwise it just returns value.


up.util.evalOption(5) // => 5

let fn = () => 1 + 2
up.util.evalOption(fn) // => 3


value any
...args Array

Return value

This website uses cookies to improve usability and analyze traffic.
I accept or learn more