simple-icons/scripts/build/templates/index.js
Eric Cornelissen 153a029c25
Restructure the scripts/ directory (#5546)
* Restructure scripts/ directory

And update references to this scripts everywhere.

* Update names of file-level constants in bump-version.js

* Normalize quotes between all scripts

* Move "create-release.yml" scripts to scripts/release

* Move slugs table script to scripts/release

* Update relative path logic in update-slugs-table.js
2021-05-07 19:55:06 +02: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;