Created
December 20, 2018 14:56
-
-
Save pixelbacon/5f29e06fb7c066795c2acb36e6645868 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function intersection(a, aa) { | |
return a.filter(item => aa.includes(item)); | |
} | |
export function intersects(a, aa) { | |
return !!intersection(a, aa).length; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment