Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async _markJSLibs(addonMetadata) {
const dispensary = new Dispensary();
const jsLibs = {};
const files = await this.io.getFilesByExt('.js');
await Promise.all(
files.map(async (filename) => {
const file = await this.io.getFile(filename);
const hashResult = dispensary.match(file);
if (hashResult !== false) {
log.debug(`${hashResult} detected in ${filename}`);
jsLibs[filename] = hashResult;
this.collector.addNotice({
...messages.KNOWN_LIBRARY,
file: filename,
});
export function createInstance(config = cli.argv) {
log.level = config.logLevel;
log.info('Creating new Dispensary instance', { config });
return new Dispensary(config);
}