MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / isWithin

Function isWithin

apps/kimi-code/src/cli/sub/plugin-run-node.ts:23–26  ·  view source on GitHub ↗
(candidate: string, root: string)

Source from the content-addressed store, hash-verified

21}
22
23function isWithin(candidate: string, root: string): boolean {
24 const relative = path.relative(root, candidate);
25 return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
26}

Callers 1

runPluginNodeEntryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected