Files
detective/parseCommand.ts
2021-04-28 16:55:22 -07:00

6 lines
153 B
TypeScript

export default function parseCommand(command: string) {
const [action, target] = command.toLocaleLowerCase().split(" ");
return { action, target };
}