{"version":3,"file":"isEmptyString-hdkq4bFg.cjs","names":["isNonEmptyString"],"sources":["../src/predicates/is/isEmptyString.ts"],"sourcesContent":["import { isNonEmptyString } from \"./isNonEmptyString\";\n\ntype IsEmptyStringOptions = {\n  /** ----------------------------------------------------------\n   * * ***Whether to trim leading and trailing whitespace before checking.***\n   * -----------------------------------------------------------\n   *\n   * @note\n   * Non-boolean values fall back to the default behavior.\n   *\n   * ---\n   * @default true\n   */\n  trim?: boolean;\n};\n\n/** ----------------------------------------------------------\n * * ***Predicate: `isEmptyString`.***\n * -----------------------------------------------------------\n * **Checks whether a given value is an **empty-string**.**\n *\n * ---\n * - **Behavior:**\n *     - Considers `\"\"` and whitespace-only strings as\n *       empty (if `trim` is enabled, which is the default).\n *     - Non-string inputs are also considered empty.\n *\n * ---\n * @param {*} value - The value to check.\n * @param {IsEmptyStringOptions} [options]\n *        Optional settings (non-plain object values are ignored and replaced with default options).\n * @param {IsEmptyStringOptions[\"trim\"]} [options.trim=true]\n *        If `true`, trims the string before checking (non-boolean values fall back to the default behavior), defaults: `true`.\n *\n * ---\n * @returns {boolean} Returns `true` if the value is string not a string or value string is considered empty.\n *\n * ---\n * @example\n * isEmptyString(\"\");\n * // ➔ true\n * isEmptyString(\"   \");\n * // ➔ true (default trims)\n * isEmptyString(\"   \", { trim: false });\n * // ➔ false\n * isEmptyString(\"hello\");\n * // ➔ false\n * isEmptyString(undefined);\n * // ➔ true\n * isEmptyString(null);\n * // ➔ true\n * isEmptyString(123 as any);\n * // ➔ true\n *\n * // Used in validation\n * if (isEmptyString(form.name)) {\n *   throw new Error(\"Name cannot be empty.\");\n * }\n */\nexport const isEmptyString = (\n  value: unknown,\n  options?: IsEmptyStringOptions\n): boolean => {\n  return !isNonEmptyString(value, options);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAa,iBACX,OACA,YACY;CACZ,OAAO,CAACA,gCAAiB,OAAO,OAAO;AACzC"}
