MCPcopy Index your code
hub / github.com/ThatGuySam/doesitarm / getSymmetricDifference

Function getSymmetricDifference

helpers/array.js:1–6  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

1export function getSymmetricDifference (a, b) {
2 return [
3 a.filter(x => !b.includes(x)),
4 b.filter(x => !a.includes(x))
5 ]
6}
7
8export function logArraysDifference (a, b) {
9 const [ aOnly, bOnly ] = getSymmetricDifference(a, b)

Callers 1

logArraysDifferenceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected