mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Improve advanced input filter
This commit is contained in:
parent
d324756edb
commit
dd6d2a7ce5
14 changed files with 131 additions and 33 deletions
13
shared/core-utils/utils/array.ts
Normal file
13
shared/core-utils/utils/array.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
function findCommonElement <T> (array1: T[], array2: T[]) {
|
||||
for (const a of array1) {
|
||||
for (const b of array2) {
|
||||
if (a === b) return a
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
export {
|
||||
findCommonElement
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue