mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
6 lines
198 B
TypeScript
6 lines
198 B
TypeScript
export function literals(string: string, literals: string[]) {
|
|
return literals.reduce((accumulator, literal, index) => {
|
|
return accumulator.replace(`%s${index + 1}`, literal);
|
|
}, string);
|
|
}
|