docs: function swap(str, swaps) {
    return str.replace(/\{[^}]*\}/g, function(name) {
      name = name.slice(1, -1);
      if (swaps == null) {
        console.log('Missing swaps while looking up \'' + name + '\'');
        return '';
      }
      var replacement = swaps[name];
      if (replacement == null) {
        console.log('Can\'t find \'' + name + '\' in ' + JSON.stringify(swaps));
        replacement = '';
      }
      return replacement;
    });
  }