Force string on format

This commit is contained in:
Sam Potts
2018-06-13 00:48:42 +10:00
parent aae1092bac
commit 0ecf7e3854
9 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@ export function format(input, ...args) {
return input;
}
return input.toString().replace(/{(\d+)}/g, (match, i) => (is.string(args[i]) ? args[i] : ''));
return input.toString().replace(/{(\d+)}/g, (match, i) => args[i].toString());
}
// Get percentage