UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

11 lines (9 loc) 221 B
function negate(func) { if (typeof func !== 'function') { throw new TypeError('Expected a function'); } return function (...args) { return !func.apply(this, args); }; } export { negate };