source:
node_modules/es-toolkit/dist/array/xor.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 250 bytes | |
| Line | |
|---|---|
| 1 | import { difference } from './difference.mjs'; |
| 2 | import { intersection } from './intersection.mjs'; |
| 3 | import { union } from './union.mjs'; |
| 4 | |
| 5 | function xor(arr1, arr2) { |
| 6 | return difference(union(arr1, arr2), intersection(arr1, arr2)); |
| 7 | } |
| 8 | |
| 9 | export { xor }; |
Note:
See TracBrowser
for help on using the repository browser.
