Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

compare

  • compare<Type>(var1: Type, var2: Type, operator: Comparator): boolean
  • Compares two variables of same type.

    Type parameters

    • Type

    Parameters

    Returns boolean

convertToObject

  • convertToObject<T>(unknownTypedInput: object | string[] | string, valueFunc?: function): object
  • Converts strings, arrays and objects into objects.

    If input is string, output is an object with one entry where the key is the string. If input is array, output is an object where each key represents one element in the array. If input is object, output is a clone of the input object.

    For strings and arrays, valueFunc is used to calculate the resulting object's property values. For objects, valueFunc has no effect -> original property values will be preserved!

    Type parameters

    • T

    Parameters

    • unknownTypedInput: object | string[] | string
    • Optional valueFunc: function
        • (key: string): T
        • Parameters

          • key: string

          Returns T

    Returns object

    • [key: string]: T

Generated using TypeDoc