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

Function buildAccessors

out/cli.cjs:72048–72058  ·  view source on GitHub ↗
(obj, header)

Source from the content-addressed store, hash-verified

72046 return filter2.test(value);
72047 }
72048}
72049function formatHeader(header) {
72050 return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w7, char, str2) => {
72051 return char.toUpperCase() + str2;
72052 });
72053}
72054function buildAccessors(obj, header) {
72055 const accessorName = utils_default.toCamelCase(" " + header);
72056 ["get", "set", "has"].forEach((methodName) => {
72057 Object.defineProperty(obj, methodName + accessorName, {
72058 value: function(arg1, arg2, arg3) {
72059 return this[methodName].call(this, header, arg1, arg2, arg3);
72060 },
72061 configurable: true

Callers 1

defineAccessorMethod · 0.85

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…