handlebarHelpers.js 1.7 KB

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.HandlebarHelpers = exports.HandlebarHelpersEnum = void 0;
  4. var HandlebarHelpersEnum;
  5. (function (HandlebarHelpersEnum) {
  6. HandlebarHelpersEnum["EQUALS"] = "equals";
  7. HandlebarHelpersEnum["TITLECASE"] = "titlecase";
  8. HandlebarHelpersEnum["UPPERCASE"] = "uppercase";
  9. HandlebarHelpersEnum["LOWERCASE"] = "lowercase";
  10. HandlebarHelpersEnum["PLURALIZE"] = "pluralize";
  11. HandlebarHelpersEnum["DATEFORMAT"] = "dateFormat";
  12. HandlebarHelpersEnum["UNIQUE"] = "unique";
  13. HandlebarHelpersEnum["GROUP_BY"] = "groupBy";
  14. HandlebarHelpersEnum["SORT_BY"] = "sortBy";
  15. HandlebarHelpersEnum["NUMBERFORMAT"] = "numberFormat";
  16. HandlebarHelpersEnum["I18N"] = "i18n";
  17. })(HandlebarHelpersEnum = exports.HandlebarHelpersEnum || (exports.HandlebarHelpersEnum = {}));
  18. exports.HandlebarHelpers = {
  19. [HandlebarHelpersEnum.EQUALS]: { description: 'assert equal' },
  20. [HandlebarHelpersEnum.TITLECASE]: { description: 'transform to TitleCase' },
  21. [HandlebarHelpersEnum.UPPERCASE]: { description: 'transform to UPPERCASE' },
  22. [HandlebarHelpersEnum.LOWERCASE]: { description: 'transform to lowercase' },
  23. [HandlebarHelpersEnum.PLURALIZE]: { description: 'pluralize if needed' },
  24. [HandlebarHelpersEnum.DATEFORMAT]: { description: 'format date' },
  25. [HandlebarHelpersEnum.UNIQUE]: { description: 'filter unique values in an array' },
  26. [HandlebarHelpersEnum.GROUP_BY]: { description: 'group by a property' },
  27. [HandlebarHelpersEnum.SORT_BY]: { description: 'sort an array of objects by a property' },
  28. [HandlebarHelpersEnum.NUMBERFORMAT]: { description: 'format number' },
  29. [HandlebarHelpersEnum.I18N]: { description: 'translate' },
  30. };