whole_func_string: function writeHeaders(file, headers, only = null) {
    for (let name in headers) {
      let value = headers[name];
      if (only && !match(name, only))
        continue;
      if (Array.isArray(value))
        for (let item of value)
          file.write(`${name}: ${item}\n`);
      else
        file.write(`${name}: ${value}\n`);
    }
  }
func_code_string: function writeHeaders(file, headers, only = null) {
    for (let name in headers) {
      let value = headers[name];
      if (only && !match(name, only))
        continue;
      if (Array.isArray(value))
        for (let item of value)
          file.write(`${name}: ${item}\n`);
      else
        file.write(`${name}: ${value}\n`);
    }
  }
func_documentation_string: Write headers to the File object.  Optional argument `only` is an array of regular expressions; only headers matching one of these expressions are written.