]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/core-utils/utils/array.ts
Improve advanced input filter
[github/Chocobozzz/PeerTube.git] / shared / core-utils / utils / array.ts
CommitLineData
dd6d2a7c
C
1function findCommonElement <T> (array1: T[], array2: T[]) {
2 for (const a of array1) {
3 for (const b of array2) {
4 if (a === b) return a
5 }
6 }
7
8 return null
9}
10
11export {
12 findCommonElement
13}