Function isDisjoint

Returns true if there are no common values between the elements of the two Arrays or Sets (i.e their intersection is empty)

  • Parameters

    • arrayOrSet1: any[] | Set<any>

      The first Array or Set

    • arrayOrSet2: any[] | Set<any>

      The second Array or Set

    • Optionaloptions: IsDisjointOptions

      TisDisjointOptions extends IloopOptions, to control the behavior of this function (which keys/values to consider etc), so you can pass any of these options to affect the comparison.

      You can also use:

      • equality to change the default equality which is strict equality ===. If you pass an equality function, it will be called with (v1, v2) and should return true if the two values are equal.

    Returns boolean

    true if there are no common values, false if there are common values