Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 | 1x 5x 7x 7x 5x 5x | export function renderSeoTemplate(template: string, values: Record<string, string | number | undefined | null>) {
return Object.entries(values).reduce((output, [label, value]) => {
const val = String(value ?? '');
return output.replaceAll(`[${label}]`, val).replaceAll(`{${label}}`, val);
}, String(template || '')).replace(/\s+/g, ' ').trim()
}
|