{"version":3,"file":"negate.cjs","names":[],"sources":["../../src/function/negate.ts"],"sourcesContent":["/**\n * Creates a function that negates the result of the predicate func.\n *\n * @template T - The type of the predicate function\n * @param predicate - The predicate to negate\n * @returns Returns the new negated function\n *\n * @example\n * const isEven = (n: number) => n % 2 === 0;\n * const isOdd = negate(isEven);\n * isOdd(3); // => true\n * isOdd(4); // => false\n *\n * @example\n * const users = [\n *   { name: 'Alice', active: true },\n *   { name: 'Bob', active: false }\n * ];\n * const isActive = (user: typeof users[0]) => user.active;\n * users.filter(negate(isActive)); // => [{ name: 'Bob', active: false }]\n */\nexport function negate<T extends (...args: never[]) => boolean>(predicate: T): T {\n  return function (this: unknown, ...args: Parameters<T>): boolean {\n    return !(predicate as (this: unknown, ...args: Parameters<T>) => boolean).apply(this, args);\n  } as T;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,OAAgD,WAAiB;CAC/E,OAAO,SAAyB,GAAG,MAA8B;EAC/D,OAAO,CAAE,UAAiE,MAAM,MAAM,IAAI;CAC5F;AACF"}