selfcarebot/node_modules/sentence-case/dist/index.js.map

1 line
1,009 B
Text
Raw Normal View History

2023-03-30 06:02:54 +00:00
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,mCAA0C;AAC1C,qDAAkD;AAIlD,SAAgB,qBAAqB,CAAC,KAAa,EAAE,KAAa;IAChE,IAAM,MAAM,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACnC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,iCAAc,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,MAAM,CAAC;AAChB,CAAC;AAJD,sDAIC;AAED,SAAgB,YAAY,CAAC,KAAa,EAAE,OAAqB;IAArB,wBAAA,EAAA,YAAqB;IAC/D,OAAO,gBAAM,CAAC,KAAK,qBACjB,SAAS,EAAE,GAAG,EACd,SAAS,EAAE,qBAAqB,IAC7B,OAAO,EACV,CAAC;AACL,CAAC;AAND,oCAMC","sourcesContent":["import { noCase, Options } from \"no-case\";\nimport { upperCaseFirst } from \"upper-case-first\";\n\nexport { Options };\n\nexport function sentenceCaseTransform(input: string, index: number) {\n const result = input.toLowerCase();\n if (index === 0) return upperCaseFirst(result);\n return result;\n}\n\nexport function sentenceCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \" \",\n transform: sentenceCaseTransform,\n ...options,\n });\n}\n"]}