Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • collapseParamsToConfigObject(nameOrConfigObject: string | ConfigObject, value?: string | number, name2?: string, value2?: string | number, name3?: string, value3?: string | number, name4?: string, value4?: string | number): ConfigObject
  • deprecated

    Use toConfigObject

    Parameters

    • nameOrConfigObject: string | ConfigObject
    • Optional value: string | number
    • Optional name2: string
    • Optional value2: string | number
    • Optional name3: string
    • Optional value3: string | number
    • Optional name4: string
    • Optional value4: string | number

    Returns ConfigObject

  • Assembles a ConfigObject from a parameter list, accepting multiple notations:

    Each entry in the list can be

    • another object, in which case the keys and values are transferred to the generated config object
    • an array, which must have exactly two elements, on the form [key, value]
    • two consecutive parameters, which will be interpreted as key, value.

    e.g. toConfigObject('a', 1, {b: 2, d: 4}, ['c', 3]) will result in an object looking like {a: 1, b: 2, c: 3, d: 4}

    The keys will always be strings, and the values will be undefined, number or string (with any other value having toString() called on it).

    This function should generally not be called directly. It is primarily meant as an internal helper function for methods which for some reason has several complicated overload signatures.

    Parameters

    • Rest ...o: unknown[]

    Returns ConfigObject