Utility for loading and managing JSON configuration files.

Constructors

Methods

Constructors

  • Load a JSON file into the configuration.

    Parameters

    • Optionalfilepath: string

      Path to the JSON file.

    Returns Config

Methods

  • Get all configuration data.

    Returns { [key: string]: any }

  • Get a value from the configuration.

    Parameters

    • key: string

      The key to retrieve.

    • OptionaldefaultValue: any

      Fallback value if key is not found.

    Returns any

  • Load/reload a JSON file.

    Parameters

    • filepath: string

      Path to the JSON file.

    Returns void

  • Set a value in the configuration (in-memory only).

    Parameters

    • key: string

      The key to set.

    • value: any

      The value to set.

    Returns void