6 lines
144 B
Text
6 lines
144 B
Text
|
// @flow
|
||
|
|
||
|
export default function format(str: string, ...args: Array<string>) {
|
||
|
return [...args].reduce((p, c) => p.replace(/%s/, c), str);
|
||
|
}
|