UNPKG

jsinspect-plus

Version:

Detect copy-pasted and structurally similar code. Supports ES2020 standard (and most proposed features), TS and TSX files. Using Babel 8's parser.

12 lines (10 loc) 289 B
function intersectionA(array1: any[], array2: any[]): any[] { return array1.filter(function (n) { return array2.indexOf(n) != -1; }); } function intersectionB(arrayA: any[], arrayB: any[]): any[] { return arrayA.filter(function (n) { return arrayB.indexOf(n) != -1; }); }