Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils"

Index

Functions

Const joinOnOrCommandRegex

  • joinOnOrCommandRegex(arr: ReadonlyArray<string>): string
  • Join the arr with | char and escaped the | if it's present in the array values

    Parameters

    • arr: ReadonlyArray<string>

      Array of element to join with an OR command

    Returns string

    • Returns an string of an OR regexp element with the | escaped

Const merge

  • merge<T>(base: T, addition: object): T
  • Returns the merge of two objects

    Type parameters

    • T

    Parameters

    • base: T

      The base object

    • addition: object

      The overloader object

    Returns T

    The merge of base and addition

Const sanitizeRegex

  • sanitizeRegex(str: string): string
  • Escape RegExp special characters

    Parameters

    • str: string

    Returns string

    • Returns escaped string

Const toArray

  • toArray<T>(x: ReadonlyArray<T> | T): ReadonlyArray<T>
  • Forced an array of T if a T is passed

    Type parameters

    • T

    Parameters

    • x: ReadonlyArray<T> | T

      Array of T element or just a T type

    Returns ReadonlyArray<T>

    • Returns an array of T if it's a T

Generated using TypeDoc