Skip to content

Commit

Permalink
fix: disable fallback for unsupported terminals (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
aneeshjose authored Oct 25, 2020
1 parent a5ada9e commit 8a3cd25
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/handlers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ const fetchModuleInfo = async (moduleName) => {
head: ["Type", "Link"],
});

const npmPageUrl = `https://npmjs.com/package/${moduleInfo.npm}`;

table.push(
["website", terminalLink(moduleInfo.website)],
["npm page", terminalLink(`https://npmjs.com/package/${moduleInfo.npm}`)],
["GitHub Repository", terminalLink(moduleInfo.github)],
[
"website",
terminalLink(moduleInfo.website, moduleInfo.website, { fallback: false }),
],
["npm page", terminalLink(npmPageUrl, npmPageUrl, { fallback: false })],
[
"GitHub Repository",
terminalLink(moduleInfo.github, moduleInfo.github, { fallback: false }),
],
);

console.log(table.toString());
Expand Down

0 comments on commit 8a3cd25

Please sign in to comment.