We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9ba9b5e + 76e3d78 commit 6f729e0Copy full SHA for 6f729e0
2 files changed
src/types/icons.ts
@@ -1,4 +1,5 @@
1
export interface Icon {
2
query: string;
3
icon: string;
4
+ exclude?: string[]
5
}
src/utils/icons.ts
@@ -8,6 +8,7 @@ export const phpIcons: Icon[] = [
8
{
9
query: "symfony/",
10
icon: "https://symfony.com/logos/symfony_black_03.svg",
11
+ exclude: ["polyfill", "var-dumper"]
12
},
13
];
14
@@ -25,9 +26,19 @@ const find = (
25
26
27
for (const name of names) {
28
for (const icon of icons) {
- if (name.includes(icon.query)) {
29
+ if (! name.includes(icon.query)) {
30
+ continue;
31
+ }
32
+
33
+ if (! icon.exclude) {
34
return icon.icon;
35
36
37
+ for (const exclude of icon.exclude) {
38
+ if (name.includes(exclude)) {
39
+ return icon.icon;
40
41
42
43
44
0 commit comments