MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / parseSubcommand

Function parseSubcommand

server/tests/unit/slack-integration.test.ts:129–131  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

127describe("Slack Command Parsing", () => {
128 // Parse command function mirrors the logic in commands.ts
129 function parseSubcommand(text: string): string {
130 return text.trim().toLowerCase().split(/\s+/)[0] || 'help';
131 }
132
133 it("should parse 'status' command", () => {
134 expect(parseSubcommand("status")).toBe("status");

Callers 1

Calls 1

trimMethod · 0.65

Tested by

no test coverage detected