source: node_modules/es-toolkit/dist/compat/function/negate.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 221 bytes
Line 
1function negate(func) {
2 if (typeof func !== 'function') {
3 throw new TypeError('Expected a function');
4 }
5 return function (...args) {
6 return !func.apply(this, args);
7 };
8}
9
10export { negate };
Note: See TracBrowser for help on using the repository browser.