Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getIconHREF(name) {
if (context.ids.indexOf(name) !== -1) {
return `#${name}`;
}
let href = context.get(name);
if (!href) {
if (process.env.ICON_BUNDLE) {
href = getIcon(name);
} else {
// backward compatibility for test
href = `#${name}`;
}
}
return href;
}