Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • isValidId(id: string): boolean
  • Test whether a string is a valid 16 character UID

    Parameters

    • id: string

    Returns boolean

  • hasFileExtension(path: string, extensions: string[]): boolean
  • Test whether a file path has an extension in a list of provided extensions

    Parameters

    • path: string
    • extensions: string[]

    Returns boolean

  • isBase64Data(data: string, types: string[]): boolean
  • Test whether a string data blob contains base64 data, optionally of a specific type or types

    Parameters

    • data: string

      The candidate string data

    • types: string[]

    Returns boolean

  • isColorString(color: string): boolean
  • Test whether an input represents a valid 6-character color string

    Parameters

    • color: string

      The input string to test

    Returns boolean

    Is the string a valid color?

  • isJSON(val: string): boolean
  • Assert that the given value parses as a valid JSON string

    Parameters

    • val: string

      The value to test

    Returns boolean

    Is the String valid JSON?