|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
430 bytes
|
| Line | |
|---|
| 1 | import { differenceWith } from './differenceWith.mjs';
|
|---|
| 2 | import { intersectionWith } from './intersectionWith.mjs';
|
|---|
| 3 | import { unionWith } from './unionWith.mjs';
|
|---|
| 4 |
|
|---|
| 5 | function xorWith(arr1, arr2, areElementsEqual) {
|
|---|
| 6 | const union = unionWith(arr1, arr2, areElementsEqual);
|
|---|
| 7 | const intersection = intersectionWith(arr1, arr2, areElementsEqual);
|
|---|
| 8 | return differenceWith(union, intersection, areElementsEqual);
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | export { xorWith };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.