const TOKEN = /\{\{([\s\S]*?)\}\}/g;
export function interpolate(template, evaluate) {
  return template.replace(TOKEN, (_token, raw) => {
    const expression = raw.trim();
    return expression.length === 0 ? "" : evaluate(expression);
  });
}
