Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(async function() {
const iconIDs = Object.keys(icons);
if (!fs.existsSync(dist)) {
fs.mkdirSync(dist);
}
const templateData = iconIDs.map(getTemplateData);
// Batch process promises to avoid overloading memory
await pMap(templateData, renderAndWrite, { concurrency: 20 });
})();