-
-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Danger Init #430
Danger Init #430
Conversation
New dependencies added: hyperlinker, readline-sync, supports-hyperlinks and @types/readline-sync. hyperlinkerAuthor: James Talmage Description: Write hyperlinks in the terminal. Homepage: https://github.com/jamestalmage/hyperlinker#readme
|
Created | over 4 years ago |
Last Updated | 16 days ago |
License | MIT |
Maintainers | 1 |
Releases | 62 |
Keywords | readline, synchronous, interactive, prompt, question, password, cli, tty, command, repl, keyboard, wait and block |
yarn why readline-sync
output
Has been hoisted to "readline-sync"
This module exists because it's specified in "dependencies".
Disk size without dependencies: "204kB"
Disk size with unique dependencies: "204kB"
Disk size with transitive dependencies: "204kB"
Number of shared dependencies: 0
supports-hyperlinks
Author: James Talmage
Description: Detect if your terminal emulator supports hyperlinks
Homepage: https://github.com/jamestalmage/supports-hyperlinks#readme
Created | 8 days ago |
Last Updated | 8 days ago |
License | MIT |
Maintainers | 1 |
Releases | 2 |
Direct Dependencies | has-flag and supports-color |
Keywords | link, terminal, hyperlink and cli |
README
supports-hyperlinks
![codecov](https://camo.githubusercontent.com/a0a56a8a51139fccee58b2cd1c15658388b9ca77fd7b28b883fd6c059cfa2f08/68747470733a2f2f636f6465636f762e696f2f67682f6a616d657374616c6d6167652f737570706f7274732d68797065726c696e6b732f62616467652e7376673f6272616e63683d6d6173746572)
Detect whether a terminal emulator supports hyperlinks
Terminal emulators are starting to support hyperlinks. While many terminals have long detected URL's and linkified them, allowing you to Command-Click or Control-Click them to open a browser, you were forced to print the long unsightly URL's on the screen. As of spring 2017 a few terminals began supporting HTML like links, where the link text and destination could be specified separately.
This module allows you to detect if hyperlinks are supported in the current Terminal.
As this is a new development, we anticipate the list of supported Terminals to grow rapidly. Please open an issue or submit a PR as new Terminals implement support.
Install
$ npm install supports-hyperlinks
Usage
const supportsHyperlinks = require('supports-hyperlinks');
if (supportsHyperlinks.stdout) {
console.log('Terminal stdout supports hyperlinks');
}
if (supportsHyperlinks.stderr) {
console.log('Terminal stderr supports hyperlinks');
}
API
Returns an Object
with a stdout
and stderr
property for testing either streams. Each property is a boolean
, indicating whether or not hyperlinks are supported.
Info
Obeys the --no-hyperlinks
, --hyperlink=always
, and --hyperlink=never
CLI flags.
Can be overridden by the user with the flags --hyperlinks=always
and --no-hyperlinks
. For situations where using those flags are not possible, add the environment variable FORCE_HYPERLINK=1
to forcefully enable hyperlinks or FORCE_HYPERLINK=0
to forcefully disable. The use of FORCE_HYPERLINK
overrides all other hyperlink support checks.
License
MIT © James Talmage
yarn why supports-hyperlinks
output
Has been hoisted to "supports-hyperlinks"
This module exists because it's specified in "dependencies".
Disk size without dependencies: "48kB"
Disk size with unique dependencies: "84kB"
Disk size with transitive dependencies: "84kB"
Number of shared dependencies: 2
Generated by 🚫 dangerJS
A bunch of words need to change (Ruby -> JS, remove anthropomorphizing) but the majority of the grunt work is done