/** * Formatter class * @export * @class Formatter */ export default class Formatter { startDelimiter: string; endDelimiter: string; /** * Creates an instance of Formatter. * * @public * @param {string} [startDelimiter='{'] String to use as starting delimiter for element to replace * @param {string} [endDelimiter='}'] String to use as ending delimiter for element to replace * @memberof Formatter */ constructor(startDelimiter?: string, endDelimiter?: string, silent?: boolean); /** * Gets the string to replace * * @private * @param {string} str * @return {string} * @memberof Formatter */ private getLookUpStr; /** * Formats string according to object * * @public * @param {string} stringToFormat The string to format * @param {Record} formatItems Object to define replace values * @example * const formatter = new Formatter(); * formatter.format('example_{toReplace}', {'toReplace': 'replaced'}) * // Thr result is 'example_replaced' * @returns {string} The replaced string * @memberof Formatter */ format(stringToFormat: string, formatItems: Record): string; }