MCPcopy
hub / github.com/nodejs/undici / headerNameToString

Function headerNameToString

lib/core/util.js:400–404  ·  view source on GitHub ↗

* Retrieves a header name and returns its lowercase value. * @param {string | Buffer} value Header name * @returns {string}

(value)

Source from the content-addressed store, hash-verified

398 * @returns {string}
399 */
400function headerNameToString (value) {
401 return typeof value === 'string'
402 ? headerNameLowerCasedRecord[value] ?? value.toLowerCase()
403 : tree.lookup(value) ?? value.toString('latin1').toLowerCase()
404}
405
406/**
407 * Receive the buffer as a string and return its lowercase value.

Callers 1

parseHeadersFunction · 0.85

Calls 2

lookupMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…