MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / enable

Function enable

out/cli.cjs:75245–75261  ·  view source on GitHub ↗
(namespaces)

Source from the content-addressed store, hash-verified

75243var debugObj = Object.assign((namespace) => {
75244 return createDebugger(namespace);
75245}, {
75246 enable,
75247 enabled,
75248 disable,
75249 log
75250});
75251function enable(namespaces) {
75252 enabledString = namespaces;
75253 enabledNamespaces = [];
75254 skippedNamespaces = [];
75255 const wildcard = /\*/g;
75256 const namespaceList = namespaces.split(",").map((ns) => ns.trim().replace(wildcard, ".*?"));
75257 for (const ns of namespaceList) {
75258 if (ns.startsWith("-")) {
75259 skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));
75260 } else {
75261 enabledNamespaces.push(new RegExp(`^${ns}$`));
75262 }
75263 }
75264 for (const instance of debuggers) {

Callers 2

cli.cjsFile · 0.85
disableFunction · 0.85

Calls 4

enabledFunction · 0.85
trimMethod · 0.80
startsWithMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected