Helps to manage options. The main addition to simply using a Set are the toggle functions and the support for temporarily disabling an option.

Constructors

Methods

  • Deletes the option with the given name.

    Parameters

    • name: string

      the option's name

    Returns void

  • Disables the option with the given name. The option and its value are kept and can be re-enabled.

    Parameters

    • name: string

      the option's name

    Returns void

  • Re-enables the option with the given name.

    Parameters

    • name: string

      the option's name

    Returns void

  • Returns the value of the given name.

    Parameters

    • name: string

      the option's name

    Returns undefined | string

  • Returns the names of all options.

    Returns IterableIterator<string>

  • Returns the names of all disabled options.

    Returns IterableIterator<string>

  • Returns the names of all enabled options.

    Returns IterableIterator<string>

  • Sets the option with the associated value.

    Parameters

    • name: string

      the option's name

    • value: string

      the option's value

    Returns void

  • Toggles the option with the given name, i.e. enables it if it is disabled and disables it if it is enabled.

    Parameters

    • name: string

      the option's name

    Returns void

  • Sets the option with the given name if it is not set and deletes it if it is enabled.

    Parameters

    • name: string

      the option's name

    • value: string

      the option's value

    Returns void