Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static parse(rawLists) {
return new Brave(new Engine(rawLists.split(/[\n\r]+/g)));
}
const generateDataFileFromString = (filterRuleData, outputDATFilename, outSubdir) => {
let rules
if (filterRuleData.constructor === Array) {
rules = filterRuleData.join('\n')
} else {
rules = filterRuleData
}
const client = new Engine(rules.split('\n'))
const arrayBuffer = client.serialize()
const outPath = getOutPath(outputDATFilename, outSubdir)
fs.writeFileSync(outPath, Buffer.from(arrayBuffer))
}