function render(template, locals){
  return foldl(function(attrs, val, key) {
    attrs[key] = val.replace(/\{\{\ *(\w+)\ *\}\}/g, function(_, $1){
      return locals[$1];
    });
    return attrs;
  }, {}, template.attrs);
}
Render template + locals into an `attrs` object.

@api private
@param {Object} template
@param {Object} locals
@return {Object}