{"name":"supports-hyperlinks","version":"4.4.0","keywords":["link","terminal","hyperlink","cli","detect","check","ansi","escapes","console"],"license":"MIT","_id":"supports-hyperlinks@4.4.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/chalk/supports-hyperlinks#readme","bugs":{"url":"https://github.com/chalk/supports-hyperlinks/issues"},"dist":{"shasum":"b25ed8e5ef67388d1ce1e83029c07df19d36b870","tarball":"http://registry-npm.ywwl.com/supports-hyperlinks/download/supports-hyperlinks-4.4.0.tgz","fileCount":6,"integrity":"sha512-UKbpT93hN5Nr9go5UY7bopIB9YQlMz9nm/ct4IXt/irb5YRkn9WaqrOBJGZ5Pwvsd5FQzSVeYlGdXoCAPQZrPg==","signatures":[{"sig":"MEYCIQC+X2VFWndV0hhzo2QE/m5Q4xZfFCheGUPSsoOFAL39TgIhAI463OpceRfL0pffCYc1zrX2NbLlatNW+HgCvMGrQNQW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8009,"size":3511,"noattachment":false,"key":"/supports-hyperlinks/-/supports-hyperlinks-4.4.0.tgz"},"type":"module","types":"./index.d.ts","browser":"browser.js","engines":{"node":">=20"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/chalk/supports-hyperlinks?sponsor=1","gitHead":"f155c11cd08f71f4b573ae7d276a38279a247272","scripts":{"test":"xo && ava && tsc --lib es2022 index.d.ts"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/chalk/supports-hyperlinks.git","type":"git"},"_npmVersion":"11.6.1","description":"Detect whether a terminal supports hyperlinks","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","dependencies":{"has-flag":"^5.0.1","supports-color":"^10.2.2"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^1.2.3","ava":"^6.4.1","codecov":"^3.8.3","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/supports-hyperlinks_4.4.0_1766687045571_0.1053310210955487","host":"s3://npm-registry-packages-npm-production"},"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":1766687045694,"_cnpm_publish_time":1766687045694,"dist-tags":{"latest":"5.0.0"}}