MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / Headers

Function Headers

scripts/libs/fetch.js:25–38  ·  view source on GitHub ↗
(headers)

Source from the content-addressed store, hash-verified

23 }
24
25 function Headers(headers) {
26 this.map = {}
27
28 if (headers instanceof Headers) {
29 headers.forEach(function(value, name) {
30 this.append(name, value)
31 }, this)
32
33 } else if (headers) {
34 Object.getOwnPropertyNames(headers).forEach(function(name) {
35 this.append(name, headers[name])
36 }, this)
37 }
38 }
39
40 Headers.prototype.append = function(name, value) {
41 name = normalizeName(name)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected