code: function format(string, mappings) {
    mappings = mappings || {}
    return string.replace(templateRE, resolve_identifier)
  
    function resolve_identifier(match, mod, key) {
      return mod == '\\:'?      '{:' + key + '}'
      :      key in mappings?   as_value(mappings[key], key)
      :      /* otherwise */    '' }}
docs: ### Function format  Performs string interpolation given a template string as basis, and a substitution map.  If a mapping is not given, we assume it to be empty, in which case the template variables are simply stripped away.  A template variable is a special construct in the form:  <template-variable> ::= "{:" <any but "}"> "}"  For example, to provide a "Hello, world!" template, that adjusts to a given name, one could write:  format("Hello, {:subject}!", { subject: "world" }) // => "Hello, world!"  A template variable can be escaped by placing a backslash between the open-curly braces and the colon, such that the construct would be output verbatim:  format("Hello, {\\:subject}!", { subject: "world" }) // => "Hello, {:subject}!"  // Remember that backslashes must be escaped inside String // literals.  :: string, { string -> template-value } -> string