Create a new function that calls the provided fn and negates the result.
fn
Time complexity: O(1)
Space complexity: O(1)
Function to negate the return value of
The inverted return value of fn
Higher order
import { nullish } from '@jonahsnider/util';const array = [0, null, '', undefined, false];array.filter(not(nullish)); // [0, '', false] Copy
import { nullish } from '@jonahsnider/util';const array = [0, null, '', undefined, false];array.filter(not(nullish)); // [0, '', false]
Create a new function that calls the provided
fn
and negates the result.Time complexity: O(1)
Space complexity: O(1)