JSSM, a JavaScript state machine - the FSM for FSL
    Preparing search index...

    Function arr_uniq_p


    • Predicate for validating an array for uniqueness. Returns true when el is the first occurrence in source, false otherwise. Intended for use as an Array.filter callback. Not generally meant for external use.

      [1, 2, 2, 3].filter(arr_uniq_p);  // [1, 2, 3]
      

      Type Parameters

      • T

      Parameters

      • el: T

        The current element being tested.

      • i: number

        The index of the current element.

      • source: T[]

        The full array being filtered.

      Returns boolean

      true if el is the first occurrence in source.