Skip to content

ElectronCommandLine.hasSwitch method

ElectronCommandLine › hasSwitch

Unofficial

Returns whether the given command-line switch is present.

Signature:

hasSwitch(theSwitch: string): boolean

Parameters:

Parameter Type Description
theSwitch string The switch to check.

Returns: booleanWhether the command-line switch is present.