{"_id":"supports-hyperlinks@5.0.0","bugs":{"url":"https://github.com/chalk/supports-hyperlinks/issues"},"dist":{"shasum":"badd7cabda59e0cb8daf6203d1ef9042885ee32c","tarball":"http://registry-npm.ywwl.com/supports-hyperlinks/download/supports-hyperlinks-5.0.0.tgz","fileCount":6,"integrity":"sha512-+pKvWs0acYGnQAmn6UREXABwb/fsQfmGQgB/QnRP874122adqN0hvXZlOtT33czD77w3xNqmhSyY2jxoVgcTpg==","signatures":[{"sig":"MEUCIQC7299q9zQrOKV75hMAiyuDMpR38dDgvXaRtqz0h9cC9gIgc6a6H8ImXX/Jf+UJ3XuO/VwdYRNmV3qS6Om+3dJLY4g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGvy7g60VCXFs8bmuPT4iOBV8doB+Ft77dNXzHHO3IhxAiEAmRGb85yQnVXH+JibCvrf7IQnu9/D1WXP/IR5xgl0PmQ="}],"unpackedSize":9352,"size":3955,"noattachment":false,"key":"/supports-hyperlinks/-/supports-hyperlinks-5.0.0.tgz"},"name":"supports-hyperlinks","type":"module","types":"./index.d.ts","engines":{"node":">=22"},"exports":{"types":"./index.d.ts","browser":"./browser.js","default":"./index.js"},"funding":"https://github.com/chalk/supports-hyperlinks?sponsor=1","gitHead":"aef2d759f1c66a3a5c0c863a1ff8cc59247a0a11","license":"MIT","scripts":{"test":"xo && node --test && tsc --lib es2022 index.d.ts"},"version":"5.0.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"homepage":"https://github.com/chalk/supports-hyperlinks#readme","keywords":["link","terminal","hyperlink","cli","detect","check","ansi","escapes","console"],"repository":{"url":"git+https://github.com/chalk/supports-hyperlinks.git","type":"git"},"_npmVersion":"12.2.0","description":"Detect whether a terminal supports hyperlinks","directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.12.1","dependencies":{"has-flag":"^5.0.1","supports-color":"^11.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^5.0.1","codecov":"^3.8.3","typescript":"^6.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/supports-hyperlinks_5.0.0_1793438362782_0.22674822146389695"},"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":1793438362861,"_cnpm_publish_time":1793438362861,"dist-tags":{"latest":"5.0.0"}}