Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Functions

Let exists

  • exists(parentObject: any, childParam: string): boolean
  • checks if an object has a parameter with a given key name, returns true if yes.

    Parameters

    • parentObject: any
    • childParam: string

    Returns boolean

Let forEachMinimatch

  • forEachMinimatch(parentObjectArg: any, wildcardArg: string, callbackArg: any): Promise<void>
  • runs a function for all properties of an object whose key matches a regex expression

    Parameters

    • parentObjectArg: any

      the parent object

    • wildcardArg: string

      the rege expression to match the property keys against

    • callbackArg: any

      the function to run with those properties

    Returns Promise<void>

Const smartAdd

  • smartAdd(parentObject: any, childParam: string, valueArg?: object, optionsArg?: object): any & any
  • adds an object to the parent object if it doesn't exists

    Parameters

    • parentObject: any
    • childParam: string
    • Default value valueArg: object = {}
    • Optional optionsArg: object
      • interpretDotsAsLevel: boolean

    Returns any & any

Const smartGet

  • smartGet<T>(parentObject: any, childParam: string, optionsArg?: object): T
  • gets an object from the parent object using dots as levels by default

    Type parameters

    • T

    Parameters

    • parentObject: any
    • childParam: string
    • Optional optionsArg: object
      • interpretDotsAsLevel: boolean

    Returns T

Generated using TypeDoc