{"name":"supports-hyperlinks","version":"4.2.0","keywords":["link","terminal","hyperlink","cli","detect","check","ansi","escapes","console"],"license":"MIT","_id":"supports-hyperlinks@4.2.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":"1390e93929294866c93f688afbfea351eae25dda","tarball":"http://registry-npm.ywwl.com/supports-hyperlinks/download/supports-hyperlinks-4.2.0.tgz","fileCount":6,"integrity":"sha512-FWXryrXrsYX2vlTD9WdfgOeN7a2EbuS3MiMaDkFibR0B6IxelCNbFgUJEGLn3eSn+9HX7RuM0ig6Lzr8lccxUA==","signatures":[{"sig":"MEQCIDGbnGqGzoTxAt4m1VzCEiOqGdr5FzfEBACI6zUt8Q9FAiB6QY6RdfINY/Vx8mWOI3AFTiAMjpjZMLWUieVfeNCTVw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7576,"size":3334,"noattachment":false,"key":"/supports-hyperlinks/-/supports-hyperlinks-4.2.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":"414305b31f11c85857826ce6edc8b0d9286b75ba","scripts":{"test":"xo && ava && tsc index.d.ts"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/chalk/supports-hyperlinks.git","type":"git"},"_npmVersion":"10.9.2","description":"Detect whether a terminal supports hyperlinks","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"has-flag":"^5.0.1","supports-color":"^10.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","ava":"^6.2.0","codecov":"^3.8.3","typescript":"^5.8.2"},"_npmOperationalInternal":{"tmp":"tmp/supports-hyperlinks_4.2.0_1758041424335_0.679810919384279","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":1758041424515,"_cnpm_publish_time":1758041424515,"dist-tags":{"latest":"5.0.0"}}