code: function interpolate(string, variables) {
    return string.replace(INTERPOLATION_REGEX, match => {
      const key = match.slice(1, -1);
      return Object.prototype.hasOwnProperty.call(variables, key)
        ? variables[key]
        : match;
    });
  }
docs: /*
  This intentionally only supports `{key}`, not any of the fancy Python string
  formatting extras. If `key` maps to a string in `variables`, that string is
  inserted. Otherwise it is kept as-is. No escaping, no nothing. KISS and
  YAGNI. If somebody does want fancy extras, they can do it themselves before
  putting the value in `variables`.
  
  Also support `[key]`, since `{foo}` is already used in JSX syntax:
  
  const user = "Bob"
  <Node uri="test">Hello, {user}!</Node>
  <Node uri="test">Hello, [user]!</Node>
  <Node uri="test">{`Hello, {user}!`}</Node>