1 function findCommonElement <T> (array1: T[], array2: T[]) {
2 for (const a of array1) {
3 for (const b of array2) {
11 // Avoid conflict with other toArray() functions
12 function arrayify <T> (element: T | T[]) {
13 if (Array.isArray(element)) return element
18 // Avoid conflict with other uniq() functions
19 function uniqify <T> (elements: T[]) {
20 return Array.from(new Set(elements))