0.2.6 • Published 6 years ago

cli-hyperlinks v0.2.6

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
6 years ago

cli-hyperlinks

Creates hyperlink like URLs in your CLI

Usage

import * as hyperlinks from 'cli-hyperlinks';

async function main() {
  await hyperlinks.enableHyperlinks();

  console.log(`Learn more about ${hyperlinks.a("https://de.wikipedia.org/wiki/Hyperlink", "Hyperlinks")}!`);
}

As long as the application is running you can use the hyperlinks rendered by the cli application:

Api

enableHyperlinks

enableHyperLinks: () => Promise

Enables the rendering of hyperlinks and launches a proxy that forwards the hyperlinks to the original urls.

Note that this also keeps the cli open!

hyperlink (Alias: a)

hyperlink(url: string, text: string): Hyperlink

Renders a hyperlink, that can be used in your cli:

console.log(hyperlink("http://exmaple.com", "Link"))

Creates an object with a .toString method that prints an url, pointing to a proxy, which redirects to the original hyperlinked url.

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago