{"name":"supports-hyperlinks","version":"3.2.0","keywords":["link","terminal","hyperlink","cli","detect","check","ansi","escapes","console"],"license":"MIT","_id":"supports-hyperlinks@3.2.0","maintainers":[{"name":"jamestalmage","email":"james@talmage.io"},{"name":"novemberborn","email":"mark@novemberborn.net"},{"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":"b8e485b179681dea496a1e7abdf8985bd3145461","tarball":"http://registry-npm.ywwl.com/supports-hyperlinks/download/supports-hyperlinks-3.2.0.tgz","fileCount":6,"integrity":"sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==","signatures":[{"sig":"MEUCIGDW2NidaPzIUzRujHjK9Xcm/t+TU86QgknjH/nxsw+dAiEAzh9pMKSZu0lNE0Mcsl/q4iNPXi3+8w5A/mPY+3w+JYg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7010,"size":3235,"noattachment":false,"key":"/supports-hyperlinks/-/supports-hyperlinks-3.2.0.tgz"},"types":"./index.d.ts","browser":"browser.js","engines":{"node":">=14.18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/chalk/supports-hyperlinks?sponsor=1","gitHead":"72d47d3e48c7db34926e5e0fa3ad5cda303c34d8","scripts":{"test":"ava","//test":"xo && ava && tsc"},"_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":"23.6.1","dependencies":{"has-flag":"^4.0.0","supports-color":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.53.0","ava":"^3.2.0","codecov":"^3.5.0","typescript":"^4.9.5","@tsconfig/node14":"^1.0.3","@types/supports-color":"^8.1.1"},"_npmOperationalInternal":{"tmp":"tmp/supports-hyperlinks_3.2.0_1738479189482_0.07829475308339551","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","publish_time":1738479189656,"_cnpm_publish_time":1738479189656,"dist-tags":{"latest":"5.0.0"}}