Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.dist.util.StringHelper.js.map Maven / Gradle / Ivy
{"version":3,"file":"StringHelper.js","sourceRoot":"","sources":["../../src/util/StringHelper.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;AAClD,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkB,CAAC;AAClD,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEnD,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC3C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,eAAe,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,MAAc,EAAE,EAAE;IAC3C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;QACxE,eAAe,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC;IACD,OAAO,eAAe,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC5C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAClC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5G,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE;IACzC,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,UAAU,EAAE;QACf,OAAO,UAAU,CAAC;KAClB;IAED,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACpE,gBAAgB,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,CAAC","sourcesContent":["const kebabToCamelMap = new Map();\nconst camelToKebabMap = new Map();\nconst kebabToPascalMap = new Map();\n\nconst kebabToCamelCase = (string: string) => {\n\tif (!kebabToCamelMap.has(string)) {\n\t\tconst result = toCamelCase(string.split(\"-\"));\n\t\tkebabToCamelMap.set(string, result);\n\t}\n\treturn kebabToCamelMap.get(string)!;\n};\n\nconst camelToKebabCase = (string: string) => {\n\tif (!camelToKebabMap.has(string)) {\n\t\tconst result = string.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\t\tcamelToKebabMap.set(string, result);\n\t}\n\treturn camelToKebabMap.get(string)!;\n};\n\nconst toCamelCase = (parts: Array) => {\n\treturn parts.map((string, index) => {\n\t\treturn index === 0 ? string.toLowerCase() : string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n\t}).join(\"\");\n};\n\nconst kebabToPascalCase = (src: string) => {\n\tconst cachedName = kebabToPascalMap.get(src);\n\tif (cachedName) {\n\t\treturn cachedName;\n\t}\n\n\tconst camelStr = kebabToCamelCase(src);\n\tconst result = camelStr.charAt(0).toUpperCase() + camelStr.slice(1);\n\tkebabToPascalMap.set(src, result);\n\treturn result;\n};\n\nexport { kebabToCamelCase, camelToKebabCase, kebabToPascalCase };\n"]}