MCPcopy Index your code
hub / github.com/nodejs/node / headerValueNormalize

Function headerValueNormalize

deps/undici/undici.js:11532–11538  ·  view source on GitHub ↗
(potentialValue)

Source from the content-addressed store, hash-verified

11530 }
11531 __name(isHTTPWhiteSpaceCharCode, "isHTTPWhiteSpaceCharCode");
11532 function headerValueNormalize(potentialValue) {
11533 let i = 0;
11534 let j = potentialValue.length;
11535 while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j;
11536 while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i;
11537 return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j);
11538 }
11539 __name(headerValueNormalize, "headerValueNormalize");
11540 function fill(headers, object) {
11541 if (Array.isArray(object)) {

Callers 2

appendHeaderFunction · 0.70
setMethod · 0.70

Calls 1

isHTTPWhiteSpaceCharCodeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…