UNPKG

@redocly/theme

Version:

Shared UI components lib

14 lines 600 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.frontmatterTranslate = void 0; /** * Utility function for use in React frontmatter * This function creates a string that will be processed by the frontmatter loader * to convert it into a translation key object */ const frontmatterTranslate = (key, defaultValue) => { const escapedDefaultValue = defaultValue.replace(/'/g, "\\'"); return `frontmatterTranslate('${key}', '${escapedDefaultValue}')`; }; exports.frontmatterTranslate = frontmatterTranslate; //# sourceMappingURL=frontmatter-translate.js.map