MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / createRule

Function createRule

out/cli.cjs:64428–64443  ·  view source on GitHub ↗
(pattern, ignoreCase)

Source from the content-addressed store, hash-verified

64426 var IgnoreRule = class {
64427 constructor(origin2, pattern, negative, regex) {
64428 this.origin = origin2;
64429 this.pattern = pattern;
64430 this.negative = negative;
64431 this.regex = regex;
64432 }
64433 };
64434 var createRule = (pattern, ignoreCase) => {
64435 const origin2 = pattern;
64436 let negative = false;
64437 if (pattern.indexOf("!") === 0) {
64438 negative = true;
64439 pattern = pattern.substr(1);
64440 }
64441 pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#");
64442 const regex = makeRegex(pattern, ignoreCase);
64443 return new IgnoreRule(
64444 origin2,
64445 pattern,
64446 negative,

Callers 1

_addPatternMethod · 0.85

Calls 1

makeRegexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…