Skip to main content

Settings

Settings

Index

Constructors

constructor

Methods

dump

  • dump(): Record<string, unknown>
  • Build a JSON representation of the current internal state of this settings object. The returned object can be safely passed to JSON.stringify function.


    Returns Record<string, unknown>

    The JSON representation of the current state of this settings instance

extend

forEach

  • forEach(callback: (key: string, value: unknown) => void): void
  • Parameters

    • callback: (key: string, value: unknown) => void

    Returns void

get

  • get(key: string): unknown
  • Parameters

    • key: string

    Returns unknown

import

  • import(root: Record<string, unknown>): void
  • Recursively import all properties from the given plain JavaScript object. This method has the opposite effect of the dump method.


    Parameters

    • root: Record<string, unknown>

      The root object whose properties will be imported.

    Returns void

set

  • set(key: string, value: unknown): boolean
  • Parameters

    • key: string
    • value: unknown

    Returns boolean

unset

  • unset(key: string): boolean
  • Unset a specific key or a set of keys within a namespace when the key ends with a dot (ASCII #46). If the key is “.”, all keys will be removed and this command works as a reset.


    Parameters

    • key: string

      name The key to be unset or a namespace.

    Returns boolean

    boolean

staticassert

staticextendRuntimeSettings

staticgetDefaultSettings

  • getDefaultSettings(subfield?: any): any
  • Parameters

    • subfield: any = null

    Returns any

staticgetObjectSettings

  • getObjectSettings(subject: unknown, from?: unknown): default
  • Parameters

    • subject: unknown
    • optionalfrom: unknown

    Returns default

staticgetRuntimeSettings