All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.initializers.utils.customPostProcessors.js Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.sentenceCaseProcessor = void 0;
var _constants = require("../constants");
var sentenceCase = function sentenceCase(value) {
  return value.charAt(0).toLocaleUpperCase() + value.slice(1);
};
var sentenceCaseProcessor = exports.sentenceCaseProcessor = {
  type: "postProcessor",
  name: "sentenceCaseProcessor",
  process: function process(value) {
    var shouldSentenceCase = value.startsWith(_constants.LOWERCASED);
    value = value.replace(_constants.LOWERCASED_GLOBAL_REGEX, "");
    return shouldSentenceCase ? sentenceCase(value) : value;
  }
};
//# sourceMappingURL=customPostProcessors.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy