You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

supports-hyperlinks

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supports-hyperlinks

Detect whether a terminal supports hyperlinks

4.1.0
latest
Source
npmnpm
Version published
Weekly downloads
24M
3.98%
Maintainers
2
Weekly downloads
 
Created

What is supports-hyperlinks?

The supports-hyperlinks npm package is used to check if the terminal environment supports hyperlinks. This is useful for developers who want to include clickable links in their terminal applications, but need to ensure compatibility with the user's terminal emulator.

What are supports-hyperlinks's main functionalities?

Checking if hyperlinks are supported

This feature allows you to check if the standard output (stdout) and standard error (stderr) streams of the terminal support hyperlinks. The package exports an object with two properties: stdout and stderr, which are booleans indicating support.

const supportsHyperlinks = require('supports-hyperlinks');

if (supportsHyperlinks.stdout) {
  console.log('Terminal supports hyperlinks');
} else {
  console.log('Terminal does not support hyperlinks');
}

if (supportsHyperlinks.stderr) {
  console.log('Stderr supports hyperlinks');
}

Other packages similar to supports-hyperlinks

Keywords

link

FAQs

Package last updated on 10 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts