MCPcopy
hub / github.com/di-sukharev/opencommit / normalize

Method normalize

out/cli.cjs:72157–72175  ·  view source on GitHub ↗
(format)

Source from the content-addressed store, hash-verified

72155 const key = keys[i3];
72156 if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
72157 delete this[key];
72158 deleted = true;
72159 }
72160 }
72161 return deleted;
72162 }
72163 normalize(format) {
72164 const self2 = this;
72165 const headers = {};
72166 utils_default.forEach(this, (value, header) => {
72167 const key = utils_default.findKey(headers, header);
72168 if (key) {
72169 self2[key] = normalizeValue2(value);
72170 delete self2[header];
72171 return;
72172 }
72173 const normalized = format ? formatHeader(header) : String(header).trim();
72174 if (normalized !== header) {
72175 delete self2[header];
72176 }
72177 self2[normalized] = normalizeValue2(value);
72178 headers[normalized] = true;

Callers 8

R4Function · 0.80
parseNonShellFunction · 0.80
validateLabelFunction · 0.80
processingFunction · 0.80
T2Function · 0.80
transformDataFunction · 0.80
cli.cjsFile · 0.80

Calls 4

normalizeValue2Function · 0.85
formatHeaderFunction · 0.85
trimMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected