{"name":"supports-hyperlinks","version":"3.1.0","description":"Detect if your terminal emulator supports hyperlinks","license":"MIT","repository":{"type":"git","url":"git+https://github.com/jamestalmage/supports-hyperlinks.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"James Talmage","email":"james@talmage.io","url":"github.com/jamestalmage"},"exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=14.18"},"scripts":{"prepublishOnly":"npm run create-types","test":"xo && nyc ava && tsc","create-types":"tsc --project declaration.tsconfig.json"},"browser":"browser.js","keywords":["link","terminal","hyperlink","cli"],"dependencies":{"has-flag":"^4.0.0","supports-color":"^7.0.0"},"devDependencies":{"@tsconfig/node14":"^1.0.3","@types/supports-color":"^8.1.1","ava":"^2.2.0","codecov":"^3.5.0","nyc":"^14.1.1","typescript":"^4.9.5","xo":"^0.24.0"},"nyc":{"reporter":["lcov","text"]},"_id":"supports-hyperlinks@3.1.0","gitHead":"e931b5b4b87b0c009bdadf1a612a0fa02acb9969","types":"./index.d.ts","bugs":{"url":"https://github.com/jamestalmage/supports-hyperlinks/issues"},"homepage":"https://github.com/jamestalmage/supports-hyperlinks#readme","_nodeVersion":"18.20.4","_npmVersion":"10.6.0","dist":{"integrity":"sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==","shasum":"b56150ff0173baacc15f21956450b61f2b18d3ac","tarball":"http://registry-npm.ywwl.com/supports-hyperlinks/download/supports-hyperlinks-3.1.0.tgz","fileCount":6,"unpackedSize":7455,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+Efslp7EDsWWVIbJJlsZd/GSt9vpxToG89qU34d83RQIhANuHm/NoNqUB6U2t6ixI+kAp1XY76ukuZln5JY/Zlr+5"}],"size":3386,"noattachment":false,"key":"/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/supports-hyperlinks_3.1.0_1724183194454_0.4537178737861598"},"_hasShrinkwrap":false,"readme":"# supports-hyperlinks [![Build Status](https://travis-ci.org/jamestalmage/supports-hyperlinks.svg?branch=master)](https://travis-ci.org/jamestalmage/supports-hyperlinks) [![codecov](https://codecov.io/gh/jamestalmage/supports-hyperlinks/badge.svg?branch=master)](https://codecov.io/gh/jamestalmage/supports-hyperlinks?branch=master)\n\n> Detect whether a terminal emulator 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\n## Usage\n\n```js\nconst supportsHyperlinks = require('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  * [`hyperlinker`](https://github.com/jamestalmage/hyperlinker): Write hyperlinks for the Terminal.\n\n## License\n\nMIT © [James Talmage](https://github.com/jamestalmage)\n","publish_time":1724183194609,"maintainers":[{"name":"jamestalmage","email":"james@talmage.io"},{"name":"novemberborn","email":"mark@novemberborn.net"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_cnpm_publish_time":1724183194609,"dist-tags":{"latest":"5.0.0"}}