Skip to content

Commit 58aca08

Browse files
committed
npm: tidy loop
1 parent fb0877d commit 58aca08

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

npmjs.com/index.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,13 @@ function main() {
7575
}
7676

7777
if (sidebar) {
78-
const checkers = [
78+
for (const base of [
7979
"https://bundlephobia.com/",
8080
"https://npmgraph.js.org/",
8181
"https://socket.dev/npm/package",
8282
"https://snyk.io/advisor/npm-package",
83-
];
84-
85-
for (const checker of checkers) {
86-
const link = document.querySelector(`[href^="${checker}"]`);
83+
]) {
84+
const link = document.querySelector(`[href^="${base}"]`);
8785
if (link) {
8886
link.remove();
8987
}

0 commit comments

Comments
 (0)