package.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":["LOWERCASED","LOWERCASED_GLOBAL_REGEX","sentenceCase","value","charAt","toLocaleUpperCase","slice","sentenceCaseProcessor","type","name","process","shouldSentenceCase","startsWith","replace"],"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,SAASA,UAAU,EAAEC,uBAAuB;AAE5C,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;AAEtD,OAAO,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,CAACZ,UAAU,CAAC;IACvDG,KAAK,GAAGA,KAAK,CAACU,OAAO,CAACZ,uBAAuB,EAAE,EAAE,CAAC;IAElD,OAAOU,kBAAkB,GAAGT,YAAY,CAACC,KAAK,CAAC,GAAGA,KAAK;EACzD;AACF,CAAC"}