{"version":3,"file":"index.mjs","sources":[""],"sourcesContent":["import { _getCaseWords } from \"../_caseWords/index.ts\";\n\nexport type TGetStrWithKebabCaseArgs = Parameters<typeof getStrWithKebabCase>;\n\nexport type TGetStrWithKebabCaseReturn = ReturnType<typeof getStrWithKebabCase>;\n\n/**\n * Converts a string to kebab-case.\n * @param {string} str Source string\n * @returns {string} kebab-case string\n * @throws {TypeError} getStrWithKebabCase: str must be a string\n * @example\n * getStrWithKebabCase(\"helloWorld value\"); // \"hello-world-value\"\n * @example\n * // Convert a component variant into a CSS class modifier\n * const modifier = `button--${getStrWithKebabCase(variantName)}`;\n */\nexport const getStrWithKebabCase = (str: string): string => {\n  if (typeof str !== \"string\") {\n    throw new TypeError(\"getStrWithKebabCase: str must be a string\");\n  }\n  return _getCaseWords(str).map((word) => word.toLocaleLowerCase()).join(\"-\");\n};\n"],"names":["getStrWithKebabCase","str","TypeError","_getCaseWords","map","word","toLocaleLowerCase","join"],"mappings":"mDAiBO,MAAMA,oBAAuBC,MAClC,UAAWA,MAAQ,SACjB,MAAM,IAAIC,UAAU,6CAEtB,OAAOC,cAAcF,KAAKG,IAAKC,MAASA,KAAKC,qBAAqBC,KAAK"}