{
  "_id": "hyperlinker",
  "maintainers": [
    {
      "name": "jamestalmage",
      "email": "james@talmage.io"
    }
  ],
  "keywords": [
    "terminal",
    "link",
    "hyperlink",
    "cli"
  ],
  "dist-tags": {
    "latest": "1.0.0"
  },
  "author": {
    "name": "James Talmage",
    "email": "james@talmage.io",
    "url": "github.com/jamestalmage"
  },
  "_rev": "1-be2ca884a5307ba9db94f77d0d6b95cd",
  "description": "Write hyperlinks in the terminal.",
  "readme": "# hyperlinker [![Build Status](https://travis-ci.org/jamestalmage/hyperlinker.svg?branch=master)](https://travis-ci.org/jamestalmage/hyperlinker) [![codecov](https://codecov.io/gh/jamestalmage/hyperlinker/badge.svg?branch=master)](https://codecov.io/gh/jamestalmage/hyperlinker?branch=master)\n\n> Write hyperlinks in the terminal.\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 will create hyperlinks when printed to a supported terminal.\n\n## Install\n\n```\n$ npm install hyperlinker\n```\n\n\n## Usage\n\n```js\nconst hyperlinker = require('hyperlinker');\n\nconsole.log(hyperlinker('some text', 'https://example.com') + '   <--- command + click here!');\n// some text    <-- command + click here!\n\n```\n\nNote that this module does not check to see if hyperlinks are supported in the current Terminal. In unsupported terminals, users will likely only see the `text` command. You should use module [`supports-hyperlinks`](https://github.com/jamestalmage/supports-hyperlinks) if you want to provide an alternate presentation based on Terminal support.\n\n```js\nconst supportsHyperlinks = require('supports-hyperlinks');\nconst hyperlinker = require('hyperlinker');\n\nif (supportsHyperlinks.stdout) {\n    console.log(hyperlinker('click here', 'https://example.com'));\n} else {\n    console.log('Copy and paste the following in your browser: \\n\\t https://example.com');\n}\n```\n\n## API\n\n### hyperlinker(text, uri, [params])\n\n#### text\n\nType: `string`\n\nThe text that will be visible in the link. This is equivalent to the text between the opening `<a>` and closing `</a>` tags in HTML.\n\n#### uri\n\nType: `string`\n\nA URI (i.e `https://example.com`) where the link will point to. This is equivalent to the context of the `href` attribute in an HTML `<a>` tag.\n\n#### params\n\nType: `Object`<br>\n*Optional*\n\nA collection of key value pairs, that will be printed as hidden `params`. There's not a lot of use for these right now, except for maybe [an id param](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#hover-underlining-and-the-id-parameter). It is intended to allow extension of the spec in the future.\n\n\n## License\n\nMIT © [James Talmage](https://github.com/jamestalmage)\n",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/jamestalmage/hyperlinker.git"
  },
  "bugs": {
    "url": "https://github.com/jamestalmage/hyperlinker/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "hyperlinker",
      "version": "1.0.0",
      "description": "Write hyperlinks in the terminal.",
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+https://github.com/jamestalmage/hyperlinker.git"
      },
      "author": {
        "name": "James Talmage",
        "email": "james@talmage.io",
        "url": "github.com/jamestalmage"
      },
      "engines": {
        "node": ">=4"
      },
      "scripts": {
        "test": "xo && nyc ava"
      },
      "files": [
        "index.js",
        "browser.js"
      ],
      "keywords": [
        "terminal",
        "link",
        "hyperlink",
        "cli"
      ],
      "browser": "browser.js",
      "dependencies": {},
      "devDependencies": {
        "ava": "^0.20.0",
        "chalk": "^2.3.0",
        "codecov": "^2.2.0",
        "nyc": "^11.0.0",
        "xo": "^0.18.2"
      },
      "nyc": {
        "reporter": [
          "lcov",
          "text"
        ]
      },
      "gitHead": "10c980aac40191e82e7fd08b8d8022871f9171f2",
      "bugs": {
        "url": "https://github.com/jamestalmage/hyperlinker/issues"
      },
      "homepage": "https://github.com/jamestalmage/hyperlinker#readme",
      "_id": "hyperlinker@1.0.0",
      "_npmVersion": "5.5.1",
      "_nodeVersion": "8.9.1",
      "_npmUser": {
        "name": "jamestalmage",
        "email": "james@talmage.io"
      },
      "dist": {
        "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==",
        "shasum": "23dc9e38a206b208ee49bc2d6c8ef47027df0c0e",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/hyperlinker/-/hyperlinker-1.0.0.tgz",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQCUtyh14DYOYSKCVWDce/DK1j2HYNR/sH7Ryr389aMDpgIga+dyRDNtAn6Oxd8vXxWfsVQmqsz9lqbjRyChv2pcqsQ="
          }
        ]
      },
      "maintainers": [
        {
          "name": "jamestalmage",
          "email": "james@talmage.io"
        }
      ],
      "_npmOperationalInternal": {
        "host": "s3://npm-registry-packages",
        "tmp": "tmp/hyperlinker-1.0.0.tgz_1511839983190_0.6319599573034793"
      }
    }
  },
  "name": "hyperlinker",
  "time": {
    "modified": "2026-05-19T14:46:54.351Z",
    "created": "2017-11-28T03:33:04.128Z",
    "1.0.0": "2017-11-28T03:33:04.128Z"
  },
  "readmeFilename": "readme.md",
  "homepage": "https://github.com/jamestalmage/hyperlinker#readme"
}