Skip to content

ElectronCommandLine.hasSwitch method

ElectronCommandLine › hasSwitch

Unofficial

Returns whether the given command-line switch is present.

Signature:

hasSwitch(theSwitch: string): boolean

Parameters:

ParameterTypeDescription
theSwitchstringThe switch to check.

Returns: booleanWhether the command-line switch is present.