package.cjs.initializers.utils.customPostProcessors.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
{"version":3,"file":"customPostProcessors.js","names":["_constants","require","sentenceCase","value","charAt","toLocaleUpperCase","slice","sentenceCaseProcessor","exports","type","name","process","shouldSentenceCase","startsWith","LOWERCASED","replace","LOWERCASED_GLOBAL_REGEX"],"sources":["../../../../src/initializers/utils/customPostProcessors.js"],"sourcesContent":["import { LOWERCASED, LOWERCASED_GLOBAL_REGEX } from \"../constants\";\n\nconst sentenceCase = value =>\n value.charAt(0).toLocaleUpperCase() + value.slice(1);\n\nexport const sentenceCaseProcessor = {\n type: \"postProcessor\",\n name: \"sentenceCaseProcessor\",\n process: value => {\n const shouldSentenceCase = value.startsWith(LOWERCASED);\n value = value.replace(LOWERCASED_GLOBAL_REGEX, \"\");\n\n return shouldSentenceCase ? sentenceCase(value) : value;\n },\n};\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,KAAK;EAAA,OACxBA,KAAK,CAACC,MAAM,CAAC,CAAC,CAAC,CAACC,iBAAiB,CAAC,CAAC,GAAGF,KAAK,CAACG,KAAK,CAAC,CAAC,CAAC;AAAA;AAE/C,IAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG;EACnCE,IAAI,EAAE,eAAe;EACrBC,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAE,SAATA,OAAOA,CAAER,KAAK,EAAI;IAChB,IAAMS,kBAAkB,GAAGT,KAAK,CAACU,UAAU,CAACC,qBAAU,CAAC;IACvDX,KAAK,GAAGA,KAAK,CAACY,OAAO,CAACC,kCAAuB,EAAE,EAAE,CAAC;IAElD,OAAOJ,kBAAkB,GAAGV,YAAY,CAACC,KAAK,CAAC,GAAGA,KAAK;EACzD;AACF,CAAC","ignoreList":[]}