MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / toToolPathSegments

Function toToolPathSegments

apps/cli/src/tooling.ts:26–30  ·  view source on GitHub ↗
(parts: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

24const TOOL_PATH_TOKEN = /^[A-Za-z0-9._-]+$/;
25
26const toToolPathSegments = (parts: ReadonlyArray<string>): ReadonlyArray<string> =>
27 parts
28 .flatMap((part) => part.split("."))
29 .map((segment) => segment.trim())
30 .filter((segment) => segment.length > 0);
31
32const isPrefixOf = (prefix: ReadonlyArray<string>, path: ReadonlyArray<string>): boolean =>
33 prefix.every((segment, index) => path[index] === segment);

Callers 3

inspectToolPathFunction · 0.85
buildToolPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected