{"_id":"check-links","_rev":"411567","name":"check-links","description":"Robustly checks an array of URLs for liveness.","dist-tags":{"latest":"1.1.8"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"time":{"modified":"2021-08-04T05:10:16.000Z","created":"2018-08-11T03:58:35.809Z","1.1.8":"2019-09-06T15:33:43.476Z","1.1.7":"2019-02-14T08:21:50.851Z","1.1.6":"2019-02-14T08:19:04.189Z","1.1.5":"2019-02-13T13:40:32.827Z","1.1.4":"2018-09-11T08:24:37.664Z","1.1.3":"2018-08-20T00:56:10.267Z","1.1.2":"2018-08-13T19:23:18.297Z","1.1.1":"2018-08-13T18:13:07.386Z","1.1.0":"2018-08-13T03:51:21.357Z","1.0.2":"2018-08-11T04:06:09.570Z","1.0.1":"2018-08-11T04:04:44.990Z","1.0.0":"2018-08-11T03:58:35.809Z"},"users":{},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"versions":{"1.1.8":{"name":"check-links","version":"1.1.8","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=8"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^1.2.1","nock":"^10.0.6","sinon":"^7.4.2","standard":"^12.0.1","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.6.0","is-relative-url":"^2.0.0","p-map":"^2.0.0","p-memoize":"^2.1.0"},"_id":"check-links@1.1.8","dist":{"shasum":"842184178c85d9c2ab119175bcc2672681bc88a4","size":4200,"noattachment":false,"key":"/check-links/-/check-links-1.1.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.8.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.8_1567784023241_0.341571453652707"},"_hasShrinkwrap":false,"publish_time":1567784023476,"_cnpm_publish_time":1567784023476},"1.1.7":{"name":"check-links","version":"1.1.7","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=8"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^1.2.1","nock":"^10.0.6","standard":"^12.0.1","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.6.0","is-relative-url":"^2.0.0","p-map":"^2.0.0","p-memoize":"^2.1.0"},"_id":"check-links@1.1.7","dist":{"shasum":"35d1d39b6a11bfd23bad74848a507e143743f7f9","size":3886,"noattachment":false,"key":"/check-links/-/check-links-1.1.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.7.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.7_1550132510718_0.14436727391040494"},"_hasShrinkwrap":false,"publish_time":1550132510851,"_cnpm_publish_time":1550132510851},"1.1.6":{"name":"check-links","version":"1.1.6","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=8"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^1.2.1","nock":"^10.0.6","standard":"^12.0.1","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.6.0","is-relative-url":"^2.0.0","p-map":"^2.0.0","p-memoize":"^2.1.0"},"_id":"check-links@1.1.6","dist":{"shasum":"f9285ba366070cf84d4f3c67143b06236207e0da","size":3887,"noattachment":false,"key":"/check-links/-/check-links-1.1.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.6.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.6_1550132344059_0.9389623924251922"},"_hasShrinkwrap":false,"publish_time":1550132344189,"_cnpm_publish_time":1550132344189},"1.1.5":{"name":"check-links","version":"1.1.5","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=8"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^1.2.1","nock":"^10.0.6","standard":"^12.0.1","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.6.0","is-relative-url":"^2.0.0","p-map":"^2.0.0","p-memoize":"^2.1.0"},"_id":"check-links@1.1.5","dist":{"shasum":"1cc7e85ab4b15bfdc5b34f2471951092e79bdb53","size":3893,"noattachment":false,"key":"/check-links/-/check-links-1.1.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.5.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.5_1550065232723_0.27411664069009833"},"_hasShrinkwrap":false,"publish_time":1550065232827,"_cnpm_publish_time":1550065232827},"1.1.4":{"name":"check-links","version":"1.1.4","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.0.0","is-relative-url":"^2.0.0","p-map":"^1.2.0","p-memoize":"^2.0.0"},"_id":"check-links@1.1.4","dist":{"shasum":"4003797d36b8002d96992b6d9f42a6026da3a39a","size":3884,"noattachment":false,"key":"/check-links/-/check-links-1.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.4.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.4_1536654277516_0.36825263117219764"},"_hasShrinkwrap":false,"publish_time":1536654277664,"_cnpm_publish_time":1536654277664},"1.1.3":{"name":"check-links","version":"1.1.3","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.0.0","is-relative-url":"^2.0.0","p-map":"^1.2.0","p-memoize":"^2.0.0"},"_id":"check-links@1.1.3","dist":{"shasum":"fdda189a0e1e16cb31a306ee31ee89e8854d028a","size":3711,"noattachment":false,"key":"/check-links/-/check-links-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.3.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.3_1534726570122_0.5576466148665418"},"_hasShrinkwrap":false,"publish_time":1534726570267,"_cnpm_publish_time":1534726570267},"1.1.2":{"name":"check-links","version":"1.1.2","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.0.0","is-relative-url":"^2.0.0","p-map":"^1.2.0","p-memoize":"^2.0.0"},"_id":"check-links@1.1.2","dist":{"shasum":"64611a5adae77c05bcb47eb48ffd6877103b78c2","size":3713,"noattachment":false,"key":"/check-links/-/check-links-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.2.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.2_1534188198173_0.5034926808807745"},"_hasShrinkwrap":false,"publish_time":1534188198297,"_cnpm_publish_time":1534188198297},"1.1.1":{"name":"check-links","version":"1.1.1","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"got":"^9.0.0","is-relative-url":"^2.0.0","p-map":"^1.2.0","p-memoize":"^2.0.0"},"_id":"check-links@1.1.1","dist":{"shasum":"637c9cd680502fb10c5afd0645ebc42490510948","size":3711,"noattachment":false,"key":"/check-links/-/check-links-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.1.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.1_1534183987311_0.8205025531338843"},"_hasShrinkwrap":false,"publish_time":1534183987386,"_cnpm_publish_time":1534183987386},"1.1.0":{"name":"check-links","version":"1.1.0","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc --shallow","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","500","200","check","link","link-check","url-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"is-relative-url":"^2.0.0","p-map":"^1.2.0","p-memoize":"^2.0.0"},"_id":"check-links@1.1.0","dist":{"shasum":"50f6599df8605af0397fa4e6923d684f528f5782","size":3704,"noattachment":false,"key":"/check-links/-/check-links-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.1.0.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.1.0_1534132281225_0.22983777873074662"},"_hasShrinkwrap":false,"publish_time":1534132281357,"_cnpm_publish_time":1534132281357},"1.0.2":{"name":"check-links","version":"1.0.2","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","200","check","link","link-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"is-relative-url":"^2.0.0","link-check":"^4.4.4","p-map":"^1.2.0","p-memoize":"^2.0.0","p-retry":"^2.0.0","pify":"^4.0.0"},"_id":"check-links@1.0.2","dist":{"shasum":"cc75c409aa725d17664fc45409649c0be7b9ff5a","size":3392,"noattachment":false,"key":"/check-links/-/check-links-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.0.2.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.0.2_1533960369460_0.16133848536761053"},"_hasShrinkwrap":false,"publish_time":1533960369570,"_cnpm_publish_time":1533960369570},"1.0.1":{"name":"check-links","version":"1.0.1","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","200","check","link","link-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"is-relative-url":"^2.0.0","link-check":"^4.4.4","p-map":"^1.2.0","p-memoize":"^2.0.0","p-retry":"^2.0.0","pify":"^4.0.0"},"_id":"check-links@1.0.1","dist":{"shasum":"9bb7f52b2c596503c23f067573486ef6c2228d89","size":3418,"noattachment":false,"key":"/check-links/-/check-links-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.0.1.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.0.1_1533960284891_0.8382197123148383"},"_hasShrinkwrap":false,"publish_time":1533960284990,"_cnpm_publish_time":1533960284990},"1.0.0":{"name":"check-links","version":"1.0.0","description":"Robustly checks an array of URLs for liveness.","main":"index.js","repository":{"type":"git","url":"https://github.com/transitive-bullshit/check-links.git"},"author":{"name":"Travis Fischer","email":"travis@automagical.ai"},"license":"MIT","reveal":true,"scripts":{"docs":"update-markdown-jsdoc --no-markdown-toc","test":"ava -v && standard"},"engines":{"node":">=4"},"keywords":["url","liveness","alive","dead","404","200","check","link","link-check"],"devDependencies":{"ava":"^0.25.0","nock":"^9.6.0","standard":"^11.0.0","update-markdown-jsdoc":"^1.0.6"},"dependencies":{"is-online":"^7.0.0","is-relative-url":"^2.0.0","link-check":"^4.4.4","p-map":"^1.2.0","p-memoize":"^2.0.0","p-retry":"^2.0.0","pify":"^4.0.0"},"_id":"check-links@1.0.0","dist":{"shasum":"23d3887b09d585c2b5ef7360462c7ef5ab0f7738","size":3432,"noattachment":false,"key":"/check-links/-/check-links-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-links/download/check-links-1.0.0.tgz"},"maintainers":[{"name":"fisch0920","email":"fisch0920@gmail.com"}],"_npmUser":{"name":"fisch0920","email":"fisch0920@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-links_1.0.0_1533959915677_0.24632068477056346"},"_hasShrinkwrap":false,"publish_time":1533959915809,"_cnpm_publish_time":1533959915809}},"readme":"# check-links\n\n> Robustly checks an array of URLs for liveness.\n\n[![NPM](https://img.shields.io/npm/v/check-links.svg)](https://www.npmjs.com/package/check-links) [![Build Status](https://travis-ci.com/transitive-bullshit/check-links.svg?branch=master)](https://travis-ci.com/transitive-bullshit/check-links) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nFor each URL, it first attempts an HTTP HEAD request, and if that fails it will attempt\nan HTTP GET request, retrying several times by default with exponential falloff.\n\nThis module handles concurrency and retry logic so you can check the status of thousands\nof links quickly and robustly.\n\n## Install\n\nThis module requires `node >= 8`.\n\n```bash\nnpm install --save check-links\n```\n\n## Usage\n\n```js\nconst checkLinks = require('check-links')\n\nconst results = await checkLinks([\n  'https://foo.com',\n  'https://404.com',\n])\n\nresults['https://foo.com'] // { status: 'alive', statusCode: 200 }\nresults['https://404.com'] // { status: 'dead', statusCode: 404 }\n\n// example using a custom timeout and retry count\nconst results2 = await checkLinks([\n  'https://foo.com',\n  'https://404.com',\n], {\n  timeout: 30000,\n  retry: 1\n})\n```\n\n-   Supports HTTP and HTTPS urls.\n-   Defaults to a 30 second timeout per HTTP request with 2 retries.\n-   Defaults to a Mac OS Chrome `user-agent`.\n-   Defaults to following redirects.\n\n## API\n\n<!-- Generated by documentation.js. Update this documentation by updating the source code. -->\n\n### [checkLinks](https://github.com/transitive-bullshit/check-links/blob/cf5fbcf0fc0bd150097034887b7c132384794549/index.js#L34-L51)\n\nRobustly checks an array of URLs for liveness.\n\nFor each URL, it first attempts an HTTP HEAD request, and if that fails it will attempt\nan HTTP GET request, retrying several times by default with exponential falloff.\n\nReturns a `Map<String, LivenessResult>` that maps each input URL to an object\ncontaining `status` and possibly `statusCode`.\n\n`LivenessResult.status` will be one of the following:\n\n-   `alive` if the URL is reachable (2XX status code)\n-   `dead` if the URL is not reachable\n-   `invalid` if the URL was parsed as invalid or used an unsupported protocol\n\n`LivenessResult.statusCode` will contain an integer HTTP status code if that URL resolved\nproperly.\n\nType: `function (urls, opts)`\n\n-   `urls` **[array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** Array of urls to test\n-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Optional configuration options (any extra options are passed to [got](https://github.com/sindresorhus/got#options))\n    -   `opts.concurrency` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Maximum number of urls to resolve concurrently (optional, default `8`)\n\n## Related\n\n-   [remark-lint-no-dead-urls](https://github.com/davidtheclark/remark-lint-no-dead-urls) - Remark lint plugin that inspired this module.\n\n## License\n\nMIT © [Travis Fischer](https://github.com/transitive-bullshit)\n","_attachments":{},"license":"MIT"}