// 문자열에 들어있는 [$SID], [$헤더명] 치환 토큰을 values에 있는 값으로 바꾼다. // 값이 없는 토큰은 빈 문자열로 치환한다. export const substituteVariables = (contents: string, values: Record) => contents.replace(/\[\$([^\]]+)\]/g, (_, key: string) => values[key] ?? "");