{"_id":"@jsdevtools/rehype-url-inspector","_rev":"9-df77dd1ab763c318a935f21b0dc8f968","name":"@jsdevtools/rehype-url-inspector","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.4":{"name":"@jsdevtools/rehype-url-inspector","version":"1.0.4","keywords":["unified","rehype","plugin","rehype-plugin","url","rewrite","validate","inspect","normalize","404","broken links"],"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","_id":"@jsdevtools/rehype-url-inspector@1.0.4","maintainers":[{"name":"jamesmessinger","email":"james.messinger@gmail.com"},{"name":"james_messinger","email":"j.ames.messinger@gmail.com"}],"homepage":"https://jstools.dev/rehype-url-inspector","bugs":{"url":"https://github.com/JS-DevTools/rehype-url-inspector/issues"},"dist":{"shasum":"89cee823e9544ccc8a0290719866170664ea4bfe","tarball":"https://registry.npmjs.org/@jsdevtools/rehype-url-inspector/-/rehype-url-inspector-1.0.4.tgz","fileCount":25,"integrity":"sha512-iw42hCQDZYPRzeDwufPO/eJgkvfZbPO2IgLIIt6hCcNFfDsEhGcnrrPeLSxIYbX7hjWrb33EELxtMKutevjK5w==","signatures":[{"sig":"MEUCIAd87/xAWBLu0hsYQ6SpTdQn9w7PhRwZbj+IJSzMYYdnAiEApN05HhrCUj4Wty2aIC/6S/webFmFhPYF0VTkPqbNZTw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS7uRCRA9TVsSAnZWagAAt+kQAJp8P7CX0s7Fl79zcXrB\n6Cv4XqHHz5yvZOVqjKzDSDkWsH1GGaasWADn68RpB+BKDu6BWksDuv5CQ5Yn\nUZgmI98L3ASwFoHQX/U1gsHYjN9cEFQfiIjLNxDsy+0JCosZqh0hejV9kHMS\nPVUeTYOXEGlmz9m+yYdoVSGafBUWppXMWK4eH91O80K35Kybl40VrM2nxaIn\nEVj2oiNObNSNrAW5jrC5778nicUqikwD2N1Rf1aGmKh0oQirLUQ6PpnPUBHv\n2wcmVieJWzhEKhgjJwGa/DzJtkq7RkDebG+Uy1TuIWRD1lzs8b1regZk96jb\nu++h0sBcYnQbbKty71BYLnXufL/Y/c76GBOAnz+dBB8IX954Vd6MPsJmR8u9\naqBcBRGSvo/bG8coBFGsCeIrquCZXwZ7sGdid9XPHFRu05MgaB+gErKgfr6G\ngs3a/vxYM2yMApAfnBmgJoTcjRougvbUo6aEpF8dngU6ynqomLEDWk7D0e9I\nzCuAzHrin01zg/fpjX+q/nPcisaKvJcdV0z4Copnsa5/0mt1NrTXtR6pbyAw\n92wEiTN7+AYVk2QzZNOt12tPAkNpEEOuYSvQAw7P0v+UrHThBHCBlpZU8tDV\n1MEiV8tpaXoGmgFB4E5rQvBxTFTNBTD8phiUoceXRbkN8ZNCUuz31JGmUpCL\nmHc+\r\n=gnsG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=10"},"gitHead":"4485e2ae96ad7a9ccd8daee8738cb6dd5a719001","scripts":{"bump":"bump --tag --push --all","lint":"npm run lint:typescript && npm run lint:javascript","test":"mocha && npm run lint","build":"tsc","clean":"shx rm -rf .nyc_output coverage lib","watch":"tsc --watch","release":"npm run upgrade && npm run clean && npm run build && npm test && npm run bump","upgrade":"npm-check -u && npm audit fix","coverage":"nyc node_modules/mocha/bin/mocha","lint:javascript":"eslint test","lint:typescript":"tslint -p tsconfig.json"},"_npmUser":{"name":"jamesmessinger","email":"james.messinger@gmail.com"},"repository":{"url":"git+https://github.com/JS-DevTools/rehype-url-inspector.git","type":"git"},"_npmVersion":"6.13.1","description":"A rehype plugin to inspect, validate, or rewrite URLs anywhere in an HTML document","directories":{},"_nodeVersion":"13.3.0","dependencies":{"vfile":"^4.0.2","url-regex":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","shx":"^0.3.2","chai":"^4.2.0","mocha":"^7.0.1","sinon":"^8.1.1","eslint":"^6.7.0","tslint":"^6.0.0","unified":"^8.4.2","to-vfile":"^6.0.0","npm-check":"^5.9.0","typescript":"^3.7.2","@types/chai":"^4.2.5","@types/node":"^13.7.1","@types/mocha":"^7.0.1","@types/unist":"^2.0.3","rehype-parse":"^6.0.2","rehype-stringify":"^6.0.1","typescript-tslint-plugin":"^0.5.5","@jsdevtools/tslint-modular":"^2.0.1","@jsdevtools/version-bump-prompt":"^6.0.0","@jsdevtools/eslint-config-modular":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rehype-url-inspector_1.0.4_1582021520272_0.5205676913509576","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@jsdevtools/rehype-url-inspector","version":"2.0.0","keywords":["unified","rehype","plugin","rehype-plugin","url","rewrite","validate","inspect","normalize","404","broken links"],"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","_id":"@jsdevtools/rehype-url-inspector@2.0.0","maintainers":[{"name":"james_messinger","email":"j.ames.messinger@gmail.com"},{"name":"jamesmessinger","email":"james.messinger@gmail.com"}],"homepage":"https://jstools.dev/rehype-url-inspector","bugs":{"url":"https://github.com/JS-DevTools/rehype-url-inspector/issues"},"dist":{"shasum":"cdd9c484244beca1e3fec6c32755ff78f7d1494a","tarball":"https://registry.npmjs.org/@jsdevtools/rehype-url-inspector/-/rehype-url-inspector-2.0.0.tgz","fileCount":25,"integrity":"sha512-eZQ1gUqUKqCYesqktPG0frGkRfItIHTe/KRGO9jvLV0vWVLR1H64VSF5e1fiP5Pj2HzIBUMwfJhovVGSHcEQ7Q==","signatures":[{"sig":"MEUCIQDUzsuCkQg0fZnZTSIhutxL6+4uUhvk2FnVs3gGAdjCdQIgbrURpP6lyCwekYdbEIlu5+RbW6wJG1tGWXAEBsplGRY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeS75GCRA9TVsSAnZWagAAZNMP/35pN9uqVXFbnI41lWFk\nSaB5rZvMAtu5VV3L15WIa6XVcjcN/OQy4V6wQYJfJuHaefYi0yNg+87P1ctv\nmggii2QIu5hlBG9OXcHTzRQvZHNrrqp8MHBerlZ04lu1lvpernx6WXcQkG9G\nzqsifBqqEjAIFFkBPsl1DW8ZVkoL7GSONX9MHo2UH6Pj7CJXn+fHWOWuikH+\nKeUJyHtIPd43Od3eNTjW8Or/MloRoJhMhUEEBE8opTEGmWES1KOADBn1QB98\njgtHZM07Mvux5liw2N8S3X5aq3vowCmUks6nlLWNBhL5prwDJ2HARlmo+f7v\n/FuRKJWAj0D8wDeGAPlConWK8lw2f4SK9Of1tyMx37Ywg6/r8mMNWummUSpe\n1+QoydKC0ZCdXkJ8cbnMWHzVbYtyHHoQdveIpCYlA84Uvb1M1YTYs0V2j4Cq\n+kOCZHcH+Wt9HlNmoDQ92QFVr/wrsFFG01qd+PceOx+62G+3QQpb1vsO4RIX\nrwSSbxEC9mZewN8ifb0cHT85XsPuDfeZM4LaBdPvpzQLMS1NvSvHjk9RK+/D\niKtBIm0PI6m8RGxBXVWpx+Rj84dpAFM/qBPtFTzaNGWhwfbm/6gMSRdXXSdh\nZ9DFFJfvyKJtBsZjaVPaI0Hbmwu1RV9Pajbu9QkQIgUYl/4nLnn+GVMOyUWR\n+3HH\r\n=vWqD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=10"},"gitHead":"ceffb1708f780c9e0f9f52628bb4bfe5da5f0b7e","scripts":{"bump":"bump --tag --push --all","lint":"npm run lint:typescript && npm run lint:javascript","test":"mocha && npm run lint","build":"tsc","clean":"shx rm -rf .nyc_output coverage lib","watch":"tsc --watch","release":"npm run upgrade && npm run clean && npm run build && npm test && npm run bump","upgrade":"npm-check -u && npm audit fix","coverage":"nyc node_modules/mocha/bin/mocha","lint:javascript":"eslint test","lint:typescript":"tslint -p tsconfig.json"},"_npmUser":{"name":"jamesmessinger","email":"james.messinger@gmail.com"},"repository":{"url":"git+https://github.com/JS-DevTools/rehype-url-inspector.git","type":"git"},"_npmVersion":"6.13.4","description":"A rehype plugin to inspect, validate, or rewrite URLs anywhere in an HTML document","directories":{},"_nodeVersion":"10.19.0","dependencies":{"vfile":"^4.0.2","url-regex":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","shx":"^0.3.2","chai":"^4.2.0","mocha":"^7.0.1","sinon":"^8.1.1","eslint":"^6.7.0","tslint":"^6.0.0","unified":"^8.4.2","to-vfile":"^6.0.0","npm-check":"^5.9.0","typescript":"^3.7.2","@types/chai":"^4.2.5","@types/node":"^13.7.1","@types/mocha":"^7.0.1","@types/unist":"^2.0.3","rehype-parse":"^6.0.2","rehype-stringify":"^6.0.1","typescript-tslint-plugin":"^0.5.5","@jsdevtools/tslint-modular":"^2.0.1","@jsdevtools/version-bump-prompt":"^6.0.0","@jsdevtools/eslint-config-modular":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rehype-url-inspector_2.0.0_1582022214410_0.07667102217097099","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@jsdevtools/rehype-url-inspector","version":"2.0.1","keywords":["unified","rehype","plugin","rehype-plugin","url","rewrite","validate","inspect","normalize","404","broken links"],"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","_id":"@jsdevtools/rehype-url-inspector@2.0.1","maintainers":[{"name":"james_messinger","email":"j.ames.messinger@gmail.com"},{"name":"jamesmessinger","email":"james.messinger@gmail.com"}],"homepage":"https://jstools.dev/rehype-url-inspector","bugs":{"url":"https://github.com/JS-DevTools/rehype-url-inspector/issues"},"dist":{"shasum":"923b77d6b83df5444ceee573b44e56c63cc95136","tarball":"https://registry.npmjs.org/@jsdevtools/rehype-url-inspector/-/rehype-url-inspector-2.0.1.tgz","fileCount":25,"integrity":"sha512-WvQJ2xCnLu7nbAdNNNbmWblGaL3RMs/hnY6e4JZAxHmqTv/WiQoTfF9jy2D36/hhI5WeAZvwrftSiHYvpNejkQ==","signatures":[{"sig":"MEYCIQDqkGCgE3z7PinhLGpQcUz0/JPcMPrgKZ8cGvRC/icIGgIhAKfZ+k+bRzCldI7jomeDRvfsq9f576fX7GAMVdA85A8x","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJebkQlCRA9TVsSAnZWagAAEfgP/Rcvlx5JCZ27lYWyTdgf\nZQztR/55/zssPtCYCyTe5uUaljpOdEkOkSenX9g/9nGoilals21mhRSIUuSb\noKWOZdi6sh7ZhHjM4eEokbZASUMpVCEf/iopOOcaXZupiMEyiw7a1UHX8ic8\ntDvjBtb0CsLRR+O0wsv3/gjxeVWh478Bnj5SGLXyz3+mCgGz5QeYTs+a4lnc\nwKM5PJHI2k5B4ov1DzLcvCUV1I3N2B8EvV3Y2zKtFIQmJKW9I9z8Ni1xS6al\no4tP7QJA/R4YCnH+XLqA4AaiKlxJwVrB7R48ly1H+/ks8tZrVrgw1KruBFfs\nYWBRpj/zx+JUvR4MhrPrUW29dPKTcazyn8+Y8bvtbFxI1BRZTKscAQ35XEZk\nOuWta+BbOrB78TQpdXCH16p5+Bc7zCg0EOJt7VjPhJtA/xGItDdnFy6RWyVW\nBwBylIdb4pOqAbE/DIcJsawQa3AMHe7wyyXh3OM2HrPXPchGHQG06gXFWsg0\n/9NPjRsFA0efdT0k8r83mJ0Nx9G70PuH0dbrx0l8skhGZKpI7+O+OF+fPajb\nFBjz7N6uVWY18o4C4DswqGz8O/9Fyqho7909dVq4HbpHSclrJbyDBeGmELu8\n6Ig2sUqrHNJGvSfA+gJl4GC/CRF4L9xJIS1Az2VC00JUPW4AfGmI40RflWtF\nXEVw\r\n=y3oq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=10"},"gitHead":"1bed92cc2c90d31d158eeb93e10efda34966a905","scripts":{"bump":"bump --tag --push --all","lint":"npm run lint:typescript && npm run lint:javascript","test":"mocha && npm run lint","build":"tsc","clean":"shx rm -rf .nyc_output coverage lib","watch":"tsc --watch","release":"npm run upgrade && npm run clean && npm run build && npm test && npm run bump","upgrade":"npm-check -u && npm audit fix","coverage":"nyc node_modules/mocha/bin/mocha","lint:javascript":"eslint test","lint:typescript":"tslint -p tsconfig.json"},"_npmUser":{"name":"jamesmessinger","email":"james.messinger@gmail.com"},"repository":{"url":"git+https://github.com/JS-DevTools/rehype-url-inspector.git","type":"git"},"_npmVersion":"6.13.4","description":"A rehype plugin to inspect, validate, or rewrite URLs anywhere in an HTML document","directories":{},"_nodeVersion":"10.19.0","dependencies":{"vfile":"^4.0.2","url-regex":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","shx":"^0.3.2","chai":"^4.2.0","mocha":"^7.0.1","sinon":"^8.1.1","eslint":"^6.7.0","tslint":"^6.0.0","unified":"^8.4.2","to-vfile":"^6.0.0","npm-check":"^5.9.0","typescript":"^3.7.2","@types/chai":"^4.2.5","@types/node":"^13.7.1","@types/mocha":"^7.0.1","@types/unist":"^2.0.3","rehype-parse":"^6.0.2","rehype-stringify":"^6.0.1","typescript-tslint-plugin":"^0.5.5","@jsdevtools/tslint-modular":"^2.0.1","@jsdevtools/version-bump-prompt":"^6.0.0","@jsdevtools/eslint-config-modular":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rehype-url-inspector_2.0.1_1584284708539_0.4760824718489871","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@jsdevtools/rehype-url-inspector","version":"2.0.2","keywords":["unified","rehype","plugin","rehype-plugin","url","rewrite","validate","inspect","normalize","404","broken links"],"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","_id":"@jsdevtools/rehype-url-inspector@2.0.2","maintainers":[{"name":"james_messinger","email":"j.ames.messinger@gmail.com"},{"name":"jamesmessinger","email":"james.messinger@gmail.com"}],"homepage":"https://jstools.dev/rehype-url-inspector","bugs":{"url":"https://github.com/JS-DevTools/rehype-url-inspector/issues"},"dist":{"shasum":"c3c08f5adf6865c802615f5412cb40ab5680fe29","tarball":"https://registry.npmjs.org/@jsdevtools/rehype-url-inspector/-/rehype-url-inspector-2.0.2.tgz","fileCount":25,"integrity":"sha512-iQL2lb+nOoT+5jFz1nfOa3oBJPF2JyBtPQgGmrRhxLT3QZAGIMLz/mh/9mUmk7FfKF5NB8xq0KoLn5F4/QHpyA==","signatures":[{"sig":"MEQCIBcvzTJjkoSGlGvy5qsx3lbOUUd6LT+2Opg+X07KWSTdAiAEZiwYQuMIPEtWJ1EowiCgVJlV+ToI332j+U5bjbGqfg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfE1S+CRA9TVsSAnZWagAAbmIP/jWpYs+dQMy42Qk3ZNcJ\n9mwwcZ905pZTlP+4BEdPhJ1nQsrCa9RKNFGNxeWAVvqKNU5z1bjHt+pO8YnS\nFQ7RC6ByE9FnS1fX9f6DTPPXh8kXVZVDpJnU8TzbO9z7oosuYgm2VarZKfZ2\ntJDB9gDnFmjza1K+QFvPy/cBd4sWaZL2lQqwyxGKiTs+tWEU2KDeHslomCKD\nAJG6Jfkzj9MmcAYpO6QJVwaULTMvE4dsJNGXHGyLMxcNwD8UpLI+HaS5QHP8\nXOLAfQ/+KEhEeV/JI2LOQG18dJiqQBEBE/xG1cCXbxTpmKmqm3h5/sJfgeYB\n3WD+IEeOl1tzI5nN2zKPMDqv+wVc9zkEcUTV8ufAtZ2FCYP9yMdtOYmyjeYf\n5LLMVqoOJDnctGTSHNqEZ9ZmyMVT7QHYf0INWbkc6gXcILvzAHZS5h3jaW2n\njP/+/wkF1dgSLmBFGWcxL4rPjaEkGok9jyUYBi4Y2tWYm1uubC0z3jueUm1N\niIso6qhiQyKCox8NaABfXqKO0XCsCpcVTq1vIOi9s+gHVxIpmyZN6sQUtQ3m\nqN2axOlE43oz3WC7uxHKkeJccp1aFR6GPZBCPW9nv+exi4mGCOUtW0pq/imM\ndNXgsIpGoPmIxVLWaYbfK6DZ4s9jUUy5Xhq8O+HhmCkCceNX4o5SV/hHRg4k\nF34P\r\n=uAPM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=10"},"gitHead":"2ed886d2372367a2e95fb1df2e6ffcfa33a43357","scripts":{"bump":"bump --tag --push --all","lint":"eslint src test","test":"mocha && npm run lint","build":"tsc","clean":"shx rm -rf .nyc_output coverage lib","watch":"tsc --watch","release":"npm run upgrade && npm run clean && npm run build && npm test && npm run bump","upgrade":"npm-check -u && npm audit fix","coverage":"nyc node_modules/mocha/bin/mocha"},"_npmUser":{"name":"jamesmessinger","email":"james.messinger@gmail.com"},"repository":{"url":"git+https://github.com/JS-DevTools/rehype-url-inspector.git","type":"git"},"_npmVersion":"6.14.4","description":"A rehype plugin to inspect, validate, or rewrite URLs anywhere in an HTML document","directories":{},"_nodeVersion":"10.21.0","dependencies":{"vfile":"^4.1.1","url-regex":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","shx":"^0.3.2","chai":"^4.2.0","mocha":"^8.0.1","sinon":"^9.0.2","eslint":"^7.5.0","unified":"^9.0.0","to-vfile":"^6.1.0","npm-check":"^5.9.2","typescript":"^3.9.7","@types/chai":"^4.2.11","@types/node":"^14.0.23","@types/mocha":"^8.0.0","@types/unist":"^2.0.3","rehype-parse":"^7.0.1","rehype-stringify":"^8.0.0","@jsdevtools/eslint-config":"^1.0.4","@jsdevtools/version-bump-prompt":"^6.0.5"},"_npmOperationalInternal":{"tmp":"tmp/rehype-url-inspector_2.0.2_1595102398378_0.8844967313504786","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-02-18T10:25:20.109Z","modified":"2026-01-24T16:03:07.633Z","1.0.4":"2020-02-18T10:25:20.453Z","2.0.0":"2020-02-18T10:36:54.526Z","2.0.1":"2020-03-15T15:05:08.730Z","2.0.2":"2020-07-18T19:59:58.547Z"},"bugs":{"url":"https://github.com/JS-DevTools/rehype-url-inspector/issues"},"author":{"url":"https://jamesmessinger.com","name":"James Messinger"},"license":"MIT","homepage":"https://jstools.dev/rehype-url-inspector","keywords":["unified","rehype","plugin","rehype-plugin","url","rewrite","validate","inspect","normalize","404","broken links"],"repository":{"url":"git+https://github.com/JS-DevTools/rehype-url-inspector.git","type":"git"},"description":"A rehype plugin to inspect, validate, or rewrite URLs anywhere in an HTML document","maintainers":[{"email":"jonluca.decaro@gmail.com","name":"jonluca"},{"email":"james.messinger@gmail.com","name":"jamesmessinger"},{"email":"me@philsturgeon.uk","name":"philsturgeon"},{"email":"michael@cousins.io","name":"mcous"}],"readme":"Rehype URL Inspector\n==============================\n### A [rehype](https://github.com/rehypejs/rehype) plugin to inspect, validate, or rewrite URLs anywhere in an HTML document\n\n[![Cross-Platform Compatibility](https://jstools.dev/img/badges/os-badges.svg)](https://github.com/JS-DevTools/rehype-url-inspector/actions)\n[![Build Status](https://github.com/JS-DevTools/rehype-url-inspector/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/rehype-url-inspector/actions)\n\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/rehype-url-inspector/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/rehype-url-inspector)\n[![Dependencies](https://david-dm.org/JS-DevTools/rehype-url-inspector.svg)](https://david-dm.org/JS-DevTools/rehype-url-inspector)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/rehype-url-inspector.svg)](https://www.npmjs.com/package/@jsdevtools/rehype-url-inspector)\n[![License](https://img.shields.io/npm/l/@jsdevtools/rehype-url-inspector.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/JS-DevTools/rehype-url-inspector)\n\n\n\nFeatures\n--------------------------\n- Inspect every URL on an HTML page and do whatever you want to, such as:\n  - Normalize URLs\n  - Check for broken links\n  - Replace URLs with different URLs\n  - Add attributes (like `target=\"blank\"`) to certain links\n\n- Finds **all types of URLs** by default, such as:\n  - `<a href=\"http://example.com\">`\n  - `<img src=\"img/logo.png\">`\n  - `<link rel=\"stylesheet\" href=\"/css/main.css\">`\n  - `<link rel=\"manifest\" href=\"/site.manifest\">`\n  - `<meta rel=\"canonical\" content=\"https://example.com/some/page/\">`\n  - `<meta property=\"og:image\" content=\"img/logo.png\">`\n  - `<script src=\"//example.com/script.js\">`\n  - `<script type=\"application/ld+json\">{\"url\": \"www.example.com\"}</script>`\n  - `<style>body { background: url(\"/img/background.png\"); }</style>`\n\n- You can remove the built-in URL rules\n- You can add your own **custom URL rules**\n- You can abort the URL search at any time\n\n\nExample\n--------------------------\n\n**example.html**<br>\nThis HTML file contains many different types of URLs:\n\n```html\n<html>\n  <head>\n    <link rel=\"canonical\" href=\"http://example.com/some/page/\">\n    <link rel=\"manifest\" href=\"/site.webmanifest\">\n    <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/img/favicon.png\">\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/main.css?v=5\">\n\n    <meta name=\"twitter:url\" content=\"http://example.com/some/page/\">\n    <meta name=\"twitter:image\" content=\"http://example.com/img/logo.png\">\n\n    <script type=\"application/ld+json\">\n      {\n        \"@context\": \"http://schema.org\",\n        \"headline\": \"Hello, World!\",\n        \"url\": \"http://example.com/some/page/\",\n        \"image\": \"http://example.com/img/logo.png\"\n      }\n    </script>\n\n    <style>\n      body {\n        background: #ffffff url(\"img/background.png\") center center no-repeat;\n      }\n    </style>\n  </head>\n  <body>\n    <h1>\n      <a href=\"/\">\n        <img src=\"/img/logo.png\"> Hello World\n      </a>\n    </h1>\n    <p>\n      <a href=\"//external.com\" target=\"_blank\">Lorem ipsum</a> dolor sit amet,\n      non dignissim dolor. Sed diam tellus, <a href=\"some-page.html\">malesuada, dictum nulla</a>.\n    </p>\n\n    <script src=\"//external.com/script.js\"></script>\n  </body>\n</html>\n```\n\n**example.js**<br>\nThis script reads the `example.html` file above and finds all the URLs in it. The script uses [unified](https://unifiedjs.com/), [rehype-parse](https://github.com/rehypejs/rehype/tree/master/packages/rehype-parse), [rehype-stringify](https://github.com/rehypejs/rehype/tree/master/packages/rehype-stringify), and [to-vfile](https://github.com/vfile/to-vfile).\n\n\n```javascript\nconst unified = require(\"unified\");\nconst parse = require(\"rehype-parse\");\nconst inspectUrls = require(\"@jsdevtools/rehype-url-inspector\");\nconst stringify = require(\"rehype-stringify\");\nconst toVFile = require(\"to-vfile\");\n\nasync function example() {\n  // Create a Rehype processor with the inspectUrls plugin\n  const processor = unified()\n    .use(parse)\n    .use(inspectUrls, {\n      inspectEach({ url }) {\n        // Log each URL\n        console.log(url);\n      }\n    })\n    .use(stringify);\n\n  // Read the example HTML file\n  let file = await toVFile.read(\"example.html\");\n\n  // Crawl the HTML file and find all the URLs\n  await processor.process(file);\n}\n\nexample();\n```\n\nRunning this script produces the following output:\n\n```\nhttp://example.com/some/page/\n/site.webmanifest\n/img/favicon.png\n/css/main.css?v=5\nhttp://example.com/some/page/\nhttp://example.com/img/logo.png\nhttp://schema.org\nhttp://example.com/some/page/\nhttp://example.com/img/logo.png\nimg/background.png\n/\n/img/logo.png\n//external.com\nsome-page.html\n//external.com/script.js\n```\n\n\n\nInstallation\n--------------------------\nYou can install Rehype URL Inspector via [npm](https://docs.npmjs.com/about-npm/).\n\n```bash\nnpm install @jsdevtools/rehype-url-inspector\n```\n\nYou'll probably want to install [unified](https://unifiedjs.com/), [rehype-parse](https://github.com/rehypejs/rehype/tree/master/packages/rehype-parse), [rehype-stringify](https://github.com/rehypejs/rehype/tree/master/packages/rehype-stringify), and [to-vfile](https://github.com/vfile/to-vfile) as well.\n\n```bash\nnpm install unified rehype-parse rehype-stringify to-vfile\n```\n\n\n\nUsage\n--------------------------\nUsing the URL Inspector plugin requires an understanding of how to use Unified and Rehype. [Here is an excelleng guide](https://unifiedjs.com/using-unified.html) to learn the basics.\n\nThe URL Inspector plugin works just like any other Rehype plugin. Pass it to [the `.use()` method](https://github.com/unifiedjs/unified#processoruseplugin-options) with an [options object](#options).\n\n```javascript\nconst unified = require(\"unified\");\nconst inspectUrls = require(\"@jsdevtools/rehype-url-inspector\");\n\n// Use the Rehype URL Inspector plugin with custom options\nunified().use(inspectUrls, {\n  inspect(urls) { ... },      // This function is called once with ALL of the URLs\n  inspectEach(url) { ... },   // This function is called for each URL as it's found\n  selectors: [\n    \"a[href]\",                // Only search for links, not other types of URLs\n    \"div[data-image]\"         // CSS selectors for custom URL attributes\n  ]\n});\n```\n\n\n\nOptions\n--------------------------\nRehype URL Inspector supports the following options:\n\n|Option                |Type                |Default                |Description\n|:---------------------|:-------------------|:----------------------|:-----------------------------------------\n|`selectors`           |array of strings, objects, and/or functions |[built-in selectors](src/selectors.ts) |Selectors indicate where to look for URLs in the document. Each selector can be a CSS attribute selector string, like `a[href]` or `img[src]`, or a function that accepts a [HAST node](https://github.com/syntax-tree/hast) and returns its URL(s). See [`extractors.ts`](src/extractors.ts) for examples.\n|`keepDefaultSelectors`|boolean             |`false`                |Whether to keep the default selectors in addition to any custom ones.\n|`inspect`             |function            |no-op                  |A function that is called _once_ and receives an array containing all the URLs in the document\n|`inspectEach`         |function            |no-op                  |A function that is called for _each_ URL in the document as it's found. Return `false` to abort the search and skip the rest of the document.\n\n\n\nURL Objects\n--------------------------\nThe `inspectEach()` function receives a [`UrlMatch` object](src/types.ts).  The `inspect()` function receves an array of `UrlMatch` objects.  Each object has the following properties:\n\n|Property               |Type                 |Description\n|:----------------------|:--------------------|:------------------------------------\n|`url`                  |string               |The URL that was found\n|`propertyName`         |string or undefined  |The name of the [HAST node property](https://github.com/syntax-tree/hast#properties) where the URL was found, such as `\"src\"` or `\"href\"`. If the URL was found in the text content of the node, then `propertyName` is `undefined`.\n|`node`                 |object               |The [HAST Element node](https://github.com/syntax-tree/hast#element) where the URL was found. **You can make changes to this node**, such as re-writing the URL, adding additional attributes, etc.\n|`root`                 |object               |The [HAST Root node](https://github.com/syntax-tree/hast#root). This gives you access to the whole document if you need it.\n|`file`                 |object               |The [File object](https://github.com/vfile/vfile) that gives you information about the HTML file itself, such as the path and file name.\n\n\n\nContributing\n--------------------------\nContributions, enhancements, and bug-fixes are welcome!  [Open an issue](https://github.com/JS-DevTools/rehype-url-inspector/issues) on GitHub and [submit a pull request](https://github.com/JS-DevTools/rehype-url-inspector/pulls).\n\n#### Building\nTo build the project locally on your computer:\n\n1. __Clone this repo__<br>\n`git clone https://github.com/JS-DevTools/rehype-url-inspector.git`\n\n2. __Install dependencies__<br>\n`npm install`\n\n3. __Build the code__<br>\n`npm run build`\n\n4. __Run the tests__<br>\n`npm test`\n\n\n\nLicense\n--------------------------\nRehype URL Inspector is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.\n\nThis package is [Treeware](http://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/JS-DevTools/rehype-url-inspector) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![Travis CI](https://jstools.dev/img/badges/travis-ci.svg)](https://travis-ci.com)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n","readmeFilename":"README.md"}