UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

10 lines (7 loc) 250 B
import { difference } from './difference.mjs'; import { intersection } from './intersection.mjs'; import { union } from './union.mjs'; function xor(arr1, arr2) { return difference(union(arr1, arr2), intersection(arr1, arr2)); } export { xor };