{"name":"supports-hyperlinks","version":"4.5.0","description":"Detect whether a terminal supports hyperlinks","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chalk/supports-hyperlinks.git"},"funding":"https://github.com/chalk/supports-hyperlinks?sponsor=1","type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsc --lib es2022 index.d.ts"},"browser":"browser.js","keywords":["link","terminal","hyperlink","cli","detect","check","ansi","escapes","console"],"dependencies":{"has-flag":"^5.0.1","supports-color":"^10.2.2"},"devDependencies":{"ava":"^6.4.1","codecov":"^3.8.3","typescript":"^5.9.3","xo":"^1.2.3"},"gitHead":"c6827faef24a07d55757366186a74478a77b3f3b","types":"./index.d.ts","_id":"supports-hyperlinks@4.5.0","bugs":{"url":"https://github.com/chalk/supports-hyperlinks/issues"},"homepage":"https://github.com/chalk/supports-hyperlinks#readme","_nodeVersion":"22.22.3","_npmVersion":"11.17.0","dist":{"integrity":"sha512-ZW2OvfeCXrNTbLakPUzjQG922EeGCOteFSVoek5DKStTh898wf7zgtuFlzQN8HfZCxC3Eh02yJVrRW51hADf+w==","shasum":"5e5cd74542a31ae6fdfbae75e1362b7b009c74cd","tarball":"http://registry-npm.ywwl.com/supports-hyperlinks/download/supports-hyperlinks-4.5.0.tgz","fileCount":6,"unpackedSize":8534,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDfqfpCQWdos/6TzRtIqciFUm71WKUuIcBMWbZmj5DhZAiASS72ZqKPdey4X2NprwTqFpt3rLbEK8oXGJ022fM9I9g=="}],"size":3669,"noattachment":false,"key":"/supports-hyperlinks/-/supports-hyperlinks-4.5.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/supports-hyperlinks_4.5.0_1781874262157_0.3410283555351237"},"_hasShrinkwrap":false,"readme":"# supports-hyperlinks\n\n> Detect whether a terminal supports hyperlinks\n\nTerminal emulators are [starting to support hyperlinks](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda). 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](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) began supporting HTML like links, where the link text and destination could be specified separately.\n\nThis module allows you to detect if hyperlinks are supported in the current Terminal.\n\nAs 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.\n\n## Install\n\n```sh\nnpm install supports-hyperlinks\n```\n\n## Usage\n\n```js\nimport supportsHyperlinks from 'supports-hyperlinks';\n\nif (supportsHyperlinks.stdout) {\n\tconsole.log('Terminal stdout supports hyperlinks');\n}\n\nif (supportsHyperlinks.stderr) {\n\tconsole.log('Terminal stderr supports hyperlinks');\n}\n```\n\n## API\n\nReturns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is a `boolean`, indicating whether or not hyperlinks are supported.\n\n## Info\n\nObeys the `--no-hyperlinks`, `--hyperlink=always`, and `--hyperlink=never` CLI flags.\n\nCan 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.\n\n## Related\n\n- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal\n- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color\n- [supports-terminal-graphics](https://github.com/sindresorhus/supports-terminal-graphics) - Detect which terminal graphics protocols are supported\n","publish_time":1781874262303,"_cnpm_publish_time":1781874262303,"dist-tags":{"latest":"5.0.0"}}