Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/compareArray"

Index

Functions

Functions

compareArray

  • compareArray(a: any[], b: any[]): number
  • Compare two arrays of equal length, does not deep compare objects in arrays

    Example:

    let equal: number = compareArray([1, 2, 3], [1, 2, 3]); // 0
    let greater: number = compareArray(["b"], ["a"]); // 1
    let less: number = compareArray([new Date("1/1/2017")], [new Date()]); // -1
    

    Parameters

    • a: any[]
    • b: any[]

    Returns number

isEqual

  • isEqual(a: any[], b: any[]): boolean
  • Private method used in compareArray.

    Parameters

    • a: any[]
    • b: any[]

    Returns boolean

Generated using TypeDoc