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","type","name","process","shouldSentenceCase","startsWith","LOWERCASED","replace","LOWERCASED_GLOBAL_REGEX","exports"],"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,EAAE,GAAGF,KAAK,CAACG,KAAK,CAAC,CAAC,CAAC;AAAA;AAE/C,IAAMC,qBAAqB,GAAG;EACnCC,IAAI,EAAE,eAAe;EACrBC,IAAI,EAAE,uBAAuB;EAC7BC,OAAO,EAAE,SAAAA,QAAAP,KAAK,EAAI;IAChB,IAAMQ,kBAAkB,GAAGR,KAAK,CAACS,UAAU,CAACC,qBAAU,CAAC;IACvDV,KAAK,GAAGA,KAAK,CAACW,OAAO,CAACC,kCAAuB,EAAE,EAAE,CAAC;IAElD,OAAOJ,kBAAkB,GAAGT,YAAY,CAACC,KAAK,CAAC,GAAGA,KAAK;EACzD;AACF,CAAC;AAACa,OAAA,CAAAT,qBAAA,GAAAA,qBAAA"}