{"version":3,"file":"isNullish.cjs","names":[],"sources":["../src/isNullish.ts"],"sourcesContent":["import type { NarrowedTo } from \"./internal/types/NarrowedTo\";\n\n/**\n * A function that checks if the passed parameter is either `null` or\n * `undefined` and narrows its type accordingly.\n *\n * @param data - The variable to check.\n * @returns True if the passed input is either `null` or `undefined`, false\n * otherwise.\n * @signature\n *    isNullish(data)\n * @example\n *    isNullish(undefined) //=> true\n *    isNullish(null) //=> true\n *    isNullish('somethingElse') //=> false\n * @category Guard\n */\nexport function isNullish<T>(\n  data: T | null | undefined,\n): data is NarrowedTo<T, null | undefined> {\n  return data === null || data === undefined;\n}\n"],"mappings":"mEAiBA,SAAgB,EACd,EACyC,CACzC,OAAO,GAAS"}