{"name":"terminal-link","version":"4.0.0","keywords":["link","hyperlink","url","ansi","escape","terminal","term","console","command-line"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"terminal-link@4.0.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/sindresorhus/terminal-link#readme","bugs":{"url":"https://github.com/sindresorhus/terminal-link/issues"},"ava":{"serial":true},"dist":{"shasum":"5f3e50329420fad97d07d624f7df1851d82963f1","tarball":"http://registry-npm.ywwl.com/terminal-link/download/terminal-link-4.0.0.tgz","fileCount":5,"integrity":"sha512-lk+vH+MccxNqgVqSnkMVKx4VLJfnLjDBGzH16JVZjKE2DoxP57s6/vt6JmXV5I3jBcfGrxNrYtC+mPtU7WJztA==","signatures":[{"sig":"MEUCIQCHVAXSmvyuByQCCn1qYdd9T7Qmi0THjooP23NF+U2E4gIgCc7MvCE51XmHkCN46/nJU7gcQdQjdP1Ura1q8FtxZS4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6377,"size":2501,"noattachment":false,"key":"/terminal-link/-/terminal-link-4.0.0.tgz"},"type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./index.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"1fa2892d27f388ea1cf9a2c934470fc94dda2115","scripts":{"test":"xo && tsd","//test":"xo && ava && tsd"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/sindresorhus/terminal-link.git","type":"git"},"_npmVersion":"10.9.2","description":"Create clickable links in the terminal","directories":{},"sideEffects":false,"_nodeVersion":"23.6.1","dependencies":{"ansi-escapes":"^7.0.0","supports-hyperlinks":"^3.2.0"},"_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","ava":"^6.2.0","tsd":"^0.31.2"},"_npmOperationalInternal":{"tmp":"tmp/terminal-link_4.0.0_1742929901949_0.011846698217919283","host":"s3://npm-registry-packages-npm-production"},"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":1742929902128,"_cnpm_publish_time":1742929902128,"dist-tags":{"latest":"5.0.0"}}