Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Polyfill

A Format.Utils sub-module containing methods intended to act as polyfills.

Index

Variables

Private trimWhitespaceRegExp

trimWhitespaceRegExp: RegExp

Functions

Private getIndexOfStartIndex

  • getIndexOfStartIndex(fromIndex: number, length: number): number

indexOf

  • indexOf<T>(array: T[], searchElement: T, fromIndex?: number): number
  • Returns the first index at which a given element can be found in the array, or -1 if it is not present.

    Type parameters

    • T

    Parameters

    • array: T[]

      An array instance.

    • searchElement: T

      The element to search for.

    • Optional fromIndex: number

      The index to start the search at.

    Returns number

Private indexOfPolyfill

  • indexOfPolyfill<T>(array: T[], searchElement: T, fromIndex: number): number
  • Type parameters

    • T

    Parameters

    • array: T[]
    • searchElement: T
    • fromIndex: number

    Returns number

isArray

  • isArray(object: Object): boolean
  • Returns true if an object is an array; otherwise false.

    Parameters

    • object: Object

      The object to test.

    Returns boolean

round

  • round(value: number, exponent: number): number
  • Returns a supplied numeric expression rounded to the exponent number.

    Parameters

    • value: number

      The number to format.

    • exponent: number

      The exponent which to use as a rounding base.

    Returns number

Private shiftValue

  • shiftValue(value: number, exponent: number): number

trim

  • trim(value: string): string
  • Removes the leading and trailing white space and line terminator characters from a string.

    Parameters

    • value: string

      The string to trim.

    Returns string

Private validateValueArgument

  • validateValueArgument(value: string): void

Generated using TypeDoc