function replaceMessage(template, kv) {
    return template.replace(/\$\{\w+\}/g, (str) => {
        const key = str.slice(2, -1);
        return kv[key];
    });
}
## Replace with template.

@example
```
`I'm ${name}` + { name: 'bamboo' } = I'm bamboo
```
@export
@param {*} template
@param {*} kv
@return {*}