mirror of
https://github.com/Mibew/simple-icons.git
synced 2024-11-16 10:24:12 +03:00
a4ca74602f
* Remove .travis.yml reference from .gitattributes * Minor refactoring of .svglintrc.js - Remove unused variables - Fix missing semi-colons - Remove unneeded indentation * Prevent error in clean command due to missing files * Fix indentations * Further improvements to Editorconfig and indentation * Format YAML files - Update indentation for array notation - Normalize use of newlines
20 lines
453 B
JavaScript
20 lines
453 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.title.toLowerCase() === normalizedName || icon.slug === normalizedName) {
|
|
return icon;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
module.exports = icons;
|