{"version":3,"file":"isDefined.cjs","names":["isNotValue","isValue"],"sources":["../../../../src/guards/functions/helpers/isDefined.ts"],"sourcesContent":["import type { PrimitiveObject } from '#bemedev/globals/types';\nimport type { EventObject } from '#events';\nimport { FnR } from '~types';\nimport type {\n  DefinedValue,\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  PredicateS2,\n} from '../../types';\nimport { isNotValue, isValue } from './value';\n\nexport type IsDefinedS_F = <\n  E extends EventObject = EventObject,\n  Pc = any,\n  Tc extends PrimitiveObject = PrimitiveObject,\n  T extends string = string,\n>(\n  path: DefinedValue<Pc, Tc>,\n) => FnR<E, Pc, Tc, T, boolean>;\n\n/**\n * Checks if the given path is defined (not undefined or null).\n * @param path : A {@linkcode DefinedValue}, the path to retrieve.\n * @returns A {@linkcode PredicateS2} function that returns true if the path is defined, false otherwise.\n *\n * @see {@linkcode isNotValue} for more details.\n * @see {@linkcode EventObject}\n * @see {@linkcode PromiseeMap}\n * @see {@linkcode PrimitiveObject}\n *\n */\nexport const isDefinedS: IsDefinedS_F = path => {\n  return isNotValue(path, undefined, null);\n};\n\n/**\n * Checks if the given path is undefined or null.\n * @param path : A {@linkcode DefinedValue} , the path to retrieve.\n * @returns A {@linkcode PredicateS2} function that returns true if the path is undefined or null, false otherwise.\n *\n * @see {@linkcode isValue} for more details.\n * @see {@linkcode EventObject}\n * @see {@linkcode PromiseeMap}\n * @see {@linkcode PrimitiveObject}\n */\nexport const isNotDefinedS: IsDefinedS_F = path => {\n  return isValue(path, undefined, null);\n};\n"],"mappings":";;;;;;;;;;;;;;AA+BA,MAAa,cAA2B,SAAQ;AAC9C,QAAOA,uCAAAA,WAAW,MAAM,KAAA,GAAW,KAAK;;;;;;;;;;;;AAa1C,MAAa,iBAA8B,SAAQ;AACjD,QAAOC,uCAAAA,QAAQ,MAAM,KAAA,GAAW,KAAK"}