UNPKG

@n3okill/utils

Version:
11 lines (10 loc) 351 B
/** * Replace items in string based on given object * Ex: formatMessage("Hello {World}!",{"World":"Joe"}) => Hello Joe! * @param str String to be replaced * @param params Object with items to replace * @returns String with items replaced */ export declare function formatMessage(str: string, params: { [key: string]: unknown; }): string;