Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
try {
if (fs.existsSync(customisationFilePath)) {
const additionalProducts = JSON.parse(
fs.readFileSync(customisationFilePath).toString()
);
if (additionalProducts[product.key]) {
product = {
...product,
...additionalProducts[product.key]
};
}
}
} catch (e) {
// die silently
if (alfy.debug) {
console.error(e);
}
}
}
return product;
};
process.env.HOME,
process.env.jb_search_customisation_file
);
try {
if (fs.existsSync(customisationFilePath)) {
const customSearchOptions = JSON.parse(
fs.readFileSync(customisationFilePath).toString()
);
fuseOptions = {
...fuseOptions,
...customSearchOptions
};
}
} catch (e) {
// die silently
if (alfy.debug) {
console.error(e);
}
}
}
return fuseOptions;
};
const addTimeItem = (items, title) => {
if (alfy.debug) {
items.push({ title, icon: { path: alfy.icon.get("Clock") } });
}
};