Evaluates a value or invokes a function with the provided arguments. If the value is not a function, it is returned as-is.
A scalar value or function to evaluate
Arguments forwarded to the function if val is callable
The resolved value
evaluateWith(42); // 42evaluateWith((name: string) => `Hello, ${name}`, 'World'); // 'Hello, World' Copy
evaluateWith(42); // 42evaluateWith((name: string) => `Hello, ${name}`, 'World'); // 'Hello, World'
Evaluates a value or invokes a function with the provided arguments. If the value is not a function, it is returned as-is.