parseToggle Function
Parses a string case-insensitively returning true for "ON", false for "OFF" undefined for "TOGGLE" or undefined, and the input string for anything else Used by various tools which take such arguments.
parseToggle(arg: string): string | boolean | undefined
Parameter | Type | Description |
---|---|---|
arg | string |
Returns - string | boolean | undefined
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.