Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 11x 16x 9x 138x 848x 665x | export function intersect (array1: any[] = [], array2: any[] = []): any[] { return array1.filter(value => array2.includes(value) ).filter((element, index, arr) => arr.indexOf(element) === index); } export function difference (array1: any[] = [], array2: any[] = []): any[] { return array2.filter(value => !array1.includes(value)); } export function lastEntry (array: any[]): any { return array[array.length - 1]; } export function removeEntry (map: any[], key: any): void { const stepIndex = map.findIndex(entry => entry === key); if (stepIndex > -1) { // delete by reference map.splice(stepIndex, 1); } } |