{"version":3,"file":"omit-C-R_Uxl7.cjs","names":["filterObject","negate","createObjectPredicate"],"sources":["../src/functions/omit/omit.ts"],"sourcesContent":["import type { KeysOfUnion, Many, Maybe } from '../../types';\nimport {\n  createObjectPredicate,\n  filterObject,\n  type ObjectPredicate,\n} from '../_internal/filterObject';\nimport { negate } from '../negate';\n\n/**\n * Returns a new object with all properties except the specified properties from the input object.\n * @param object The input object to omit properties from.\n * @param properties An array of property names to omit from the input object.\n * @returns A new object with all properties except the specified properties from the input object.\n */\nexport function omit<\n  T extends object,\n  const K extends keyof T | KeysOfUnion<T>,\n>(object: Maybe<T>, properties: Many<K>): Omit<T, K>;\n/**\n * Returns a new object with all properties except the properties that satisfy the predicate function from the input object.\n * @param object The input object to omit properties from.\n * @param predicate A function that takes a property value and its key and returns a boolean indicating whether to omit the property or not.\n * @returns A new object with all properties except the properties that satisfy the predicate function from the input object.\n */\nexport function omit<T extends object>(\n  object: Maybe<T>,\n  predicate: ObjectPredicate<T>\n): Partial<T>;\n/**\n * Implementation of the omit function.\n * @param object The input object to omit properties from.\n * @param propertiesOrPredicate Either an array of property names to omit from the input object, or a function that takes a property value and its key and returns a boolean indicating whether to omit the property or not.\n * @returns A new object with all properties except the specified properties from the input object.\n */\nexport function omit<\n  T extends object,\n  const K extends keyof T | KeysOfUnion<T>,\n>(object: T, propertiesOrPredicate: Many<K> | ObjectPredicate<T>) {\n  return filterObject(\n    object,\n    negate(createObjectPredicate(propertiesOrPredicate))\n  );\n}\n"],"mappings":";;;;;;;;;;AAkCA,SAAgB,KAGd,QAAW,uBAAqD;AAChE,QAAOA,kCACL,QACAC,sBAAOC,2CAAsB,sBAAsB,CAAC,CACrD"}