Skip to content

tokenizeArgs

tokenizeArgs(input): string[]

Defined in: packages/utils/src/args.ts:71

Splits text into arguments on whitespace. “Double quotes” or ‘single quotes’ keep spaces inside one argument; a backslash escapes the next character.

string

string[]

tokenizeArgs(`ban @user "being rude"`) // ["ban", "@user", "being rude"]