'use strict';

/*!
 * @techmely/utils
 * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
 * MIT Licensed
 */


// src/filterArrays/index.ts
function filterArrays(arr1, arr2, filterCondition) {
  const set = new Set(arr2);
  const result = [];
  for (const a of arr1) {
    for (const b of set) {
      if (filterCondition(a, b)) {
        result.push(a);
        break;
      }
    }
  }
  return result;
}

exports.filterArrays = filterArrays;
