Contains utility functions and types for working with functions.
| Function | Description |
|---|
| cloneFunction | Clone a function by creating a new function that calls the original function. This is useful for creating a new instance of a function that has the same behavior but is not strictly equal to the original function. |
| createFunction | Creates a function from the provided parameters. |
| getFunctionExpressionString | Converts a function into a string that is a valid function expression. Function.prototype.toString() on a shorthand method like \{ fn() \{\} \} returns "fn() \{\}", which is not a valid expression. This helper detects that form and prefixes it with function . |
| noop | A function that does nothing. |
| noopAsync | A function that does nothing. |
| omitAsyncReturnType | Makes an async function that calls the original async function with the provided arguments and omits the return value. |
| omitReturnType | Makes a function that calls the original function with the provided arguments and omits the return value. |