1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2025-01-25 01:32:58 +02:00
2021-02-19 13:06:43 +00:00

26 lines
566 B
JavaScript

var icons = {%s};
Object.defineProperty(icons, "get", {
enumerable: false,
value: function(targetName) {
if (icons[targetName]) {
return icons[targetName];
}
var normalizedName = targetName.toLowerCase();
for (var iconName in icons) {
var icon = icons[iconName];
if (icon.slug === normalizedName) {
return icon;
}
}
for (var iconName in icons) {
var icon = icons[iconName];
if (icon.title.toLowerCase() === normalizedName) {
return icon;
}
}
}
});
module.exports = icons;