index.js 519 B

1234567891011121314
  1. import { __assign } from "tslib";
  2. import { noCase } from "no-case";
  3. import { upperCaseFirst } from "upper-case-first";
  4. export function sentenceCaseTransform(input, index) {
  5. var result = input.toLowerCase();
  6. if (index === 0)
  7. return upperCaseFirst(result);
  8. return result;
  9. }
  10. export function sentenceCase(input, options) {
  11. if (options === void 0) { options = {}; }
  12. return noCase(input, __assign({ delimiter: " ", transform: sentenceCaseTransform }, options));
  13. }
  14. //# sourceMappingURL=index.js.map