A configuration utility object.

Properties can be get/set by using the Util.Configuration#value function. Properties added this way become enumerable properties of the Configuration instance as well.

Hierarchy

Implements

  • Record<string, any>

Constructors

Properties

Accessors

Methods

Constructors

Properties

#map: Map<string, any>

The configuration data.

Accessors

Methods

  • Test if a key is truthy.

    Parameters

    • key: string

      the key to test

    Returns boolean

    true if the key is enabled

  • Set or toggle the enabled status of a given key.

    If the enabled parameter is not passed, then the enabled status will be toggled to its opposite value.

    Parameters

    • key: string

      the key to set

    • Optional enabled: boolean

      the optional enabled value to set

    Returns Configuration

    this object to allow method chaining

  • Get a configuration value.

    Parameters

    • key: string

      the key to get

    Returns any

    the associated value for the given key

  • Set a configuration value.

    Parameters

    • key: string

      the key to get or set the value for

    • newValue: any

      the new value to set for the given key. If null then the value will be removed.

    Returns Configuration

    this object.

Generated using TypeDoc