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

Method append

out/cli.cjs:6530–6541  ·  view source on GitHub ↗

* Append a value onto existing header * * @param String name Header name * @param String value Header value * @return Void

(name, value)

Source from the content-addressed store, hash-verified

6528 * @return Void
6529 */
6530 append(name, value) {
6531 name = `${name}`;
6532 value = `${value}`;
6533 validateName(name);
6534 validateValue(value);
6535 const key = find(this[MAP], name);
6536 if (key !== void 0) {
6537 this[MAP][key].push(value);
6538 } else {
6539 this[MAP][name] = [value];
6540 }
6541 }
6542 /**
6543 * Check for header name existence
6544 *

Callers 1

constructorMethod · 0.95

Calls 5

validateNameFunction · 0.85
validateValueFunction · 0.85
findFunction · 0.85
appendHeaderFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected