{"name":"terminal-link","version":"5.0.0","description":"Create clickable links in the terminal","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/terminal-link.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["link","hyperlink","url","ansi","escape","terminal","term","console","command-line"],"dependencies":{"ansi-escapes":"^7.0.0","supports-hyperlinks":"^4.1.0"},"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.2"},"ava":{"serial":true},"_id":"terminal-link@5.0.0","gitHead":"975358c3b5bb99d0f9ac07ff51f692883358f6ab","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/terminal-link/issues"},"homepage":"https://github.com/sindresorhus/terminal-link#readme","_nodeVersion":"22.12.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-qFAy10MTMwjzjU8U16YS4YoZD+NQLHzLssFMNqgravjbvIPNiqkGFR4yjhJfmY9R5OFU7+yHxc6y+uGHkKwLRA==","shasum":"f0447c8940418ab49b9b9bbc47a4ad2fa8ba81e7","tarball":"http://registry-npm.ywwl.com/terminal-link/download/terminal-link-5.0.0.tgz","fileCount":5,"unpackedSize":6697,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEsiQle2rYOm3adyk3eayCLjiEsw9u5ZSXWrJl2EOi3xAiEAuBdygx3ksX3PboC1/IIS4a/IbH9Oa/cFNl35nBOtF/I="}],"size":2680,"noattachment":false,"key":"/terminal-link/-/terminal-link-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/terminal-link_5.0.0_1757330824218_0.1426954733534147"},"_hasShrinkwrap":false,"readme":"# terminal-link\n\n> Create clickable links in the terminal\n\n<img src=\"screenshot.gif\" width=\"301\" height=\"148\">\n\n## Install\n\n```sh\nnpm install terminal-link\n```\n\n## Usage\n\n```js\nimport terminalLink from 'terminal-link';\n\nconst link = terminalLink('My Website', 'https://sindresorhus.com');\nconsole.log(link);\n```\n\n## API\n\n### terminalLink(text, url, options?)\n\nCreate a link for use in stdout.\n\n[Supported terminals.](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)\n\nFor unsupported terminals, by default the link will be printed as plain text with a space separator: `My website https://sindresorhus.com`.\n\n#### text\n\nType: `string`\n\nText to linkify.\n\n#### url\n\nType: `string`\n\nURL to link to.\n\n#### options\n\nType: `object`\n\n##### fallback\n\nType: `function | boolean`\n\nOverride the default fallback. The function receives the `text` and `url` as parameters and is expected to return a string.\n\nIf set to `false`, the `text` will be returned as-is when a terminal is unsupported.\n\n### terminalLink.isSupported\n\nType: `boolean`\n\nCheck whether the terminal's stdout supports links.\n\nPrefer just using the default fallback or the `fallback` option whenever possible.\n\n### terminalLink.stderr(text, url, options?)\n\nCreate a link for use in stderr.\n\nSame arguments as `terminalLink()`.\n\n### terminalLink.stderr.isSupported\n\nType: `boolean`\n\nCheck whether the terminal's stderr supports links.\n\nPrefer just using the default fallback or the `fallback` option whenever possible.\n\n## Related\n\n- [terminal-link-cli](https://github.com/sindresorhus/terminal-link-cli) - CLI for this module\n- [ink-link](https://github.com/sindresorhus/ink-link) - Link component for Ink\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right\n","publish_time":1757330824420,"_cnpm_publish_time":1757330824420,"dist-tags":{"latest":"5.0.0"}}