Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createEngine(lists, resources) {
const engine = new adblocker.FiltersEngine({
enableOptimizations: false,
loadCosmeticFilters: true,
loadNetworkFilters: true,
optimizeAOT: false,
version: 1,
});
engine.onUpdateResource([{ filters: resources, checksum: '' }]);
const serialized = engine.onUpdateFilters(
lists.map((filters, i) => ({
asset: `${i}`,
checksum: '',
filters,
})),
new Set(),
true,