** Executes a function only when a condition is NOT met.**
const logIfNegative = unless((x: number) => x > 0, console.log);logIfNegative(-5); // Logs: -5logIfNegative(2); // (No output) Copy
const logIfNegative = unless((x: number) => x > 0, console.log);logIfNegative(-5); // Logs: -5logIfNegative(2); // (No output)
The input type.
Condition to check.
Function to execute when the condition is false.
** Executes a function only when a condition is NOT met.**
Example