{"version":3,"file":"index.cjs","sources":[""],"sourcesContent":["import { _getCaseWords } from \"../_caseWords/index.ts\";\n\nexport type TGetStrWithCamelCaseArgs = Parameters<typeof getStrWithCamelCase>;\n\nexport type TGetStrWithCamelCaseReturn = ReturnType<typeof getStrWithCamelCase>;\n\n/**\n * Converts a string to camelCase.\n * @param {string} str Source string\n * @returns {string} camelCase string\n * @throws {TypeError} getStrWithCamelCase: str must be a string\n * @example\n * getStrWithCamelCase(\"hello-world value\"); // \"helloWorldValue\"\n * @example\n * // Convert an API field name into a JavaScript property name\n * const propertyName = getStrWithCamelCase(\"billing-address-id\"); // \"billingAddressId\"\n */\nexport const getStrWithCamelCase = (str: string): string => {\n  if (typeof str !== \"string\") {\n    throw new TypeError(\"getStrWithCamelCase: str must be a string\");\n  }\n  return _getCaseWords(str)\n    .map((word, index) => {\n      const normalized = word.toLocaleLowerCase();\n      return index === 0\n        ? normalized\n        : normalized.charAt(0).toLocaleUpperCase() + normalized.slice(1);\n    })\n    .join(\"\");\n};\n"],"names":["getStrWithCamelCase","str","TypeError","_getCaseWords","map","word","index","normalized","toLocaleLowerCase","charAt","toLocaleUpperCase","slice","join"],"mappings":"sGAiBO,MAAMA,oBAAuBC,MAClC,UAAWA,MAAQ,SACjB,MAAM,IAAIC,UAAU,6CAEtB,OAAOC,MAAAA,cAAcF,KAClBG,IAAI,CAACC,KAAMC,SACV,MAAMC,WAAaF,KAAKG,oBACxB,OAAOF,QAAU,EACbC,WACAA,WAAWE,OAAO,GAAGC,oBAAsBH,WAAWI,MAAM,KAEjEC,KAAK"}