MCPcopy Create free account
hub / github.com/GCWing/BitFun / contractOwnerMatchesRoot

Function contractOwnerMatchesRoot

scripts/audit-theme-colors.test.mjs:42–52  ·  view source on GitHub ↗
(contract, sourceRoot)

Source from the content-addressed store, hash-verified

40}
41
42function contractOwnerMatchesRoot(contract, sourceRoot) {
43 return String(contract.owner ?? '')
44 .split(';')
45 .map(entry => entry.trim())
46 .filter(Boolean)
47 .some(entry => (
48 entry === sourceRoot
49 || entry.startsWith(`${sourceRoot}/`)
50 || sourceRoot.startsWith(`${entry}/`)
51 ));
52}
53
54function writeText(filePath, content) {
55 fs.mkdirSync(path.dirname(filePath), { recursive: true });

Callers 1

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected