mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-15 17:05:34 +00:00
13 lines
306 B
TypeScript
13 lines
306 B
TypeScript
import { routedCommands, type RouteSpec } from "./route-specs.js";
|
|
|
|
export type { RouteSpec } from "./route-specs.js";
|
|
|
|
export function findRoutedCommand(path: string[]): RouteSpec | null {
|
|
for (const route of routedCommands) {
|
|
if (route.match(path)) {
|
|
return route;
|
|
}
|
|
}
|
|
return null;
|
|
}
|