Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/arrays/xorWith

Index

Functions

Functions

Const xorWith

  • xorWith<T>(array1: Array<T>, array2: Array<T>, comparator: Function): T[]
  • returns a new array made of the non-intersecting items of the two given arrays, it accepts comparator which is invoked to compare elements of arrays.

    example

    xorWith([1,2,3,4], [3,4,5,6], (x,y) => x === y); // returns [1,2,5,6];

    Type parameters

    • T

    Parameters

    • array1: Array<T>
    • array2: Array<T>
    • comparator: Function

    Returns T[]

    new filtered exclusive array1

Generated using TypeDoc