mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Move test functions outside extra-utils
This commit is contained in:
parent
bf54587a3e
commit
c55e3d7227
202 changed files with 798 additions and 895 deletions
13
shared/core-utils/common/array.ts
Normal file
13
shared/core-utils/common/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