Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

terminal-link

Package Overview
Dependencies
2
Maintainers
1
Versions
8
Issues
File Explorer

Advanced tools

terminal-link

Create clickable links in the terminal

    3.0.0latest

Version published
Maintainers
1
Weekly downloads
13,208,385
decreased by-2.95%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 12 151b2c1
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/terminal-link/compare/v2.1.1...v3.0.0

Readme

Source

Create clickable links in the terminal

Install

$ npm install terminal-link

Usage

import terminalLink from 'terminal-link'; const link = terminalLink('My Website', 'https://sindresorhus.com'); console.log(link);

API

terminalLink(text, url, options?)

Create a link for use in stdout.

Supported terminals.

For unsupported terminals, the link will be printed in parens after the text: My website (https://sindresorhus.com).

text

Type: string

Text to linkify.

url

Type: string

URL to link to.

options

Type: object

fallback

Type: Function | boolean

Override the default fallback. The function receives the text and url as parameters and is expected to return a string.

If set to false, the fallback will be disabled when a terminal is unsupported.

terminalLink.isSupported

Type: boolean

Check whether the terminal's stdout supports links.

Prefer just using the default fallback or the fallback option whenever possible.

terminalLink.stderr(text, url, options?)

Create a link for use in stdout.

Same arguments as terminalLink().

terminalLink.stderr.isSupported

Type: boolean

Check whether the terminal's stderr supports links.

Prefer just using the default fallback or the fallback option whenever possible.

Keywords

FAQs

What is terminal-link?

Create clickable links in the terminal

Is terminal-link popular?

The npm package terminal-link receives a total of 11,095,463 weekly downloads. As such, terminal-link popularity was classified as popular.

Is terminal-link well maintained?

We found that terminal-link demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 18 Apr 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc