Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Axios.all(ops).then(res => {
let data = '';
for (const res1 of res) {
data += res1.data;
}
engine = FiltersEngine.parse(data);
writeFile(path, engine.serialize(), err => {
if (err) return console.error(err);
});
});
};
static parse(rawLists, enableCompression) {
return new Cliqz(FiltersEngine.parse(rawLists, {
enableCompression,
integrityCheck: false,
loadCosmeticFilters: false,
}));
}
export function createEngine(lists: string[], resources: string, options = {}, serialize = false) {
const engine = FiltersEngine.parse(lists.join('\n'), options);
engine.updateResources(resources, '');
return {
engine,
serialized: serialize ? engine.serialize() : undefined,
};
}