Changed messages format export from default to non-default

This commit is contained in:
Alexander Cerutti
2021-10-23 19:09:38 +02:00
parent ee2038005b
commit 3c706ddbb6
5 changed files with 24 additions and 20 deletions

View File

@@ -94,7 +94,7 @@ export const PACK = {
* @param values
*/
export default function format(messageName: string, ...values: any[]) {
export function format(messageName: string, ...values: any[]) {
// reversing because it is better popping than shifting.
const replaceValues = values.reverse();
return messageName.replace(/%s/g, () => replaceValues.pop());