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) 231 B
function intersectionA(array1, array2) { array1.filter(function(n) { return array2.indexOf(n) != -1; }); } function intersectionB(arrayA, arrayB) { arrayA.filter(function(n) { return arrayB.indexOf(n) != -1; }); }