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