UNPKG

@ones-design/utils

Version:

ONES Design

8 lines (7 loc) 375 B
/** * Replace with template. * `I'm ${name}` + { name: 'bamboo' } = I'm bamboo * `I has apple, orange${, :fruit}` + { fruit: 'banana' } = I has apple, orange, banana * `I has apple, orange${, :fruit}` + { fruit: '' } = I has apple, orange */ export declare function replaceMessage(template: string | undefined, kv: Record<string, string>, split?: string): string;