UNPKG

eslint-plugin-de-morgan

Version:

ESLint plugin for transforming negated boolean expressions via De Morgan’s laws

12 lines (11 loc) 332 B
/** * Negates the result of the given predicate function. * * @param predicate - A function that takes any number of arguments and returns * a boolean. * @returns A function that negates the boolean result of the predicate. */ function not(predicate) { return (...arguments_) => !predicate(...arguments_) } export { not }