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

Method add

out/cli.cjs:64498–64507  ·  view source on GitHub ↗
(pattern)

Source from the content-addressed store, hash-verified

64496 }
64497 if (checkPattern(pattern)) {
64498 const rule = createRule(pattern, this._ignoreCase);
64499 this._added = true;
64500 this._rules.push(rule);
64501 }
64502 }
64503 // @param {Array<string> | string | Ignore} pattern
64504 add(pattern) {
64505 this._added = false;
64506 makeArray(
64507 isString2(pattern) ? splitPattern(pattern) : pattern
64508 ).forEach(this._addPattern, this);
64509 if (this._added) {
64510 this._initCache();

Callers 12

finalizeSetMethod · 0.45
addPatternMethod · 0.45
makeAllStreamFunction · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
orderPoliciesMethod · 0.45
createLoggerFunction · 0.45
sanitizeMethod · 0.45
constructorMethod · 0.45
constructorMethod · 0.45
getOpenCommitIgnoreFunction · 0.45
getOpenCommitIgnoreFunction · 0.45

Calls 5

makeArrayFunction · 0.85
isString2Function · 0.85
splitPatternFunction · 0.85
_initCacheMethod · 0.80
forEachMethod · 0.45

Tested by

no test coverage detected