INNER CODE UNIT · TypeScript
tokeniseCommand
peter-evans/slash-command-dispatch · src/command-helper.ts:196
export function tokeniseCommand(command: string): string[] {
let matches
const output: string[] = []
while ((matches = TOKENISE_REGEX.exec(command))) {
output.push(matches[0])
}
return output
}
function stripQuotes(input: string): string {
if (input.startsWith(`"`) && input.endsWith(`"`)) {
return input.slice(1, input.length - 1)
} else {
return input
}
}
export function getSlashCommandPayload(