General config-file handler.

Hierarchy

  • ConfigBuilder

Constructors

Methods

Constructors

  • Config constructor.

    Parameters

    • filePath: string

    Returns ConfigBuilder

Methods

  • Delete a config value.

    Returns

    true if the deletion was successful

    Parameters

    • key: string

      the config key

    Returns boolean

  • Get a config value from a key.

    Returns

    the config value

    Parameters

    • key: string

      the config key

    • Optional defaults: any

      the default value, optional

    Returns any

  • Get path to the config file on the filesystem.

    Returns

    the path to the config file

    Returns string

  • Get the config format (eg. type).

    Returns

    either yaml or json

    Returns "yaml" | "json"

  • Check if config value exists.

    Returns

    true if the config contains that key

    Parameters

    • key: string

      the config key

    Returns boolean

  • Sets a key - value pair in config.

    Returns

    true if the value was set successfully

    Parameters

    • key: string
    • value: any

    Returns boolean

Generated using TypeDoc