Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • base64toString(base64String: string): string
  • Decodes a string of data encoded using Base64 encoding

    example
    base64toString('dGVzdA=='); // => 'test';
    

    Parameters

    • base64String: string

    Returns string

  • formatString(stringToFormat: string, params?: string[]): string
  • Returns the formatted string. It will replace parameters of the format {x}, where x is a number and will be used as the index to find the value in the array of params

    example
    const formattedString = formatString('Do you like {0} and {1}? I like {0}', ['apples', 'bananas'])
    // formattedString = 'Do you like apples and bananas? I like apples'

    Parameters

    • stringToFormat: string

      The string to format

    • Optional params: string[]

      The params to replace

    Returns string

    String with the params replaced. Will throw if the number of replacement parameters do not mat

  • isBrowser(): boolean

Generated using TypeDoc