{"_id":"detect-external-link","_rev":"4-a920b3afb9c2b59f7eee0bf7a82f58d3","name":"detect-external-link","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"detect-external-link","description":"Node.js plugin that analyzes the given link and determines if the URL is internal or external.","version":"1.0.0","main":"index.js","types":"types/index.d.ts","scripts":{"build":"rm -f index.js && tsc","lint":"eslint .","lint:js":"eslint . --ext .js","lint:ts":"eslint . --ext .ts","test":"npm run test:link && npm run test:tsd","test:link":"mocha test/link.js","test:tsd":"npx tsd"},"repository":{"type":"git","url":"git+https://github.com/trunkcode/detect-external-link.git"},"keywords":["external-link"],"author":{"name":"TrunkCode","email":"support@trunkcode.com"},"license":"MIT","bugs":{"url":"https://github.com/trunkcode/detect-external-link/issues"},"homepage":"https://github.com/trunkcode/detect-external-link#readme","runkitExampleFilename":"runkitExample.js","devDependencies":{"@typescript-eslint/eslint-plugin":"6.2.0","eslint":"8.45.0","mocha":"10.2.0","tsd":"0.28.1","typescript":"5.1.6"},"gitHead":"4fe0087399a7b37f727715886b51f7e33987b071","_id":"detect-external-link@1.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-1G5t2QbhMIgPvZ+iDM3PX4x3QCOSBdp4ylR2KjNSjnKW3bHHjNBs9hW+DMAphlxK4Fe4a8mD2lO3yX82cz7Xzw==","shasum":"00e8f5997cb315ebeb0199a8b7544e4c1f549f12","tarball":"https://registry.npmjs.org/detect-external-link/-/detect-external-link-1.0.0.tgz","fileCount":6,"unpackedSize":5509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrHY3VbouGNAswjF+cI1WfiNe2zpr0rbQcUirUnCt60QIgC+CIDmDgc6zZxRgQysYOsy6Ivw1AdiXv4zn0xeTv1rU="}]},"_npmUser":{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"},"directories":{},"maintainers":[{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-external-link_1.0.0_1690287284566_0.8329213192823268"},"_hasShrinkwrap":false},"1.0.1":{"name":"detect-external-link","description":"Node.js plugin that analyzes the given link and determines if the URL is internal or external.","version":"1.0.1","main":"index.js","types":"types/index.d.ts","scripts":{"build":"rm -f index.js && tsc","lint":"eslint .","lint:js":"eslint . --ext .js","lint:ts":"eslint . --ext .ts","test":"npm run test:link && npm run test:tsd","test:link":"mocha test/link.js","test:tsd":"npx tsd"},"repository":{"type":"git","url":"git+https://github.com/trunkcode/detect-external-link.git"},"keywords":["external-link"],"author":{"name":"TrunkCode","email":"support@trunkcode.com"},"license":"MIT","bugs":{"url":"https://github.com/trunkcode/detect-external-link/issues"},"homepage":"https://github.com/trunkcode/detect-external-link#readme","runkitExampleFilename":"runkitExample.js","devDependencies":{"@typescript-eslint/eslint-plugin":"6.2.0","eslint":"8.45.0","mocha":"10.2.0","tsd":"0.28.1","typescript":"5.1.6"},"gitHead":"ef3fdb4e0fa2f816ff54bb98c56293998ccee0eb","_id":"detect-external-link@1.0.1","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-OHa4UGI9s+tJRgQllKO4rNyRlOvmN70iM5Qds56PsD1UXAU2h0IrTiXoETgqKSQwerSfFOHYsR0k+4WZZTg2UA==","shasum":"896d55581e498483846bc6216a31560789112cab","tarball":"https://registry.npmjs.org/detect-external-link/-/detect-external-link-1.0.1.tgz","fileCount":6,"unpackedSize":5568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpnjXhIwuoenWO+zP/HNboViRbH384FSecv7ra49sHGAIhAMbk98gU6EMnJlJEMQJhVA+9CKm7it3dbZeI0jztvlCg"}]},"_npmUser":{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"},"directories":{},"maintainers":[{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-external-link_1.0.1_1690357630771_0.15465629247874224"},"_hasShrinkwrap":false},"1.0.2":{"name":"detect-external-link","description":"Node.js plugin that analyzes the given link and determines if the URL is internal or external.","version":"1.0.2","main":"index.js","types":"types/index.d.ts","scripts":{"build":"rm -f index.js && tsc","lint":"eslint .","lint:js":"eslint . --ext .js","lint:ts":"eslint . --ext .ts","test":"npm run test:link && npm run test:tsd","test:link":"mocha test/link.js","test:tsd":"npx tsd"},"repository":{"type":"git","url":"git+https://github.com/trunkcode/detect-external-link.git"},"keywords":["detection","external-link"],"author":{"name":"TrunkCode","email":"support@trunkcode.com"},"license":"MIT","bugs":{"url":"https://github.com/trunkcode/detect-external-link/issues"},"homepage":"https://github.com/trunkcode/detect-external-link#readme","runkitExampleFilename":"runkitExample.js","devDependencies":{"@typescript-eslint/eslint-plugin":"6.2.0","eslint":"8.45.0","mocha":"10.2.0","tsd":"0.28.1","typescript":"5.1.6"},"gitHead":"ef3fdb4e0fa2f816ff54bb98c56293998ccee0eb","_id":"detect-external-link@1.0.2","_nodeVersion":"20.5.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-ZOnG36WpUzvEWrziuTXSurc/OuHZt/qbfUKcrvBDHEpeGsZbJSeGKjBEX2dhS4nTIJinafiubnR9HvWu5SeguA==","shasum":"ee95d01ab426bf18a50a566df7a3a24f60c060ac","tarball":"https://registry.npmjs.org/detect-external-link/-/detect-external-link-1.0.2.tgz","fileCount":6,"unpackedSize":5586,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpLKjTWDtdA6/u621MynkYw6ahCcf9vszgGnhsNlSchwIgRrXDslj58Ndk9zXvXl7v/OZVO2xU46osVq6exZfabRM="}]},"_npmUser":{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"},"directories":{},"maintainers":[{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-external-link_1.0.2_1692946939032_0.7217383714170702"},"_hasShrinkwrap":false},"2.0.0":{"name":"detect-external-link","description":"Node.js plugin that analyzes the given link and determines if the URL is internal or external.","version":"2.0.0","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts"}},"types":"dist/esm/index.d.ts","main":"dist/cjs/index.js","module":"dist/esm/index.js","scripts":{"build":"rm -rf dist/* && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json","lint":"eslint src","lint:fix":"eslint src --fix","test":"npm run test:link && npm run test:tsd","test:link":"mocha test/link.js","test:tsd":"npx tsd"},"repository":{"type":"git","url":"git+https://github.com/trunkcode/detect-external-link.git"},"keywords":["detection","external-link"],"author":{"name":"TrunkCode","email":"support@trunkcode.com"},"license":"MIT","bugs":{"url":"https://github.com/trunkcode/detect-external-link/issues"},"homepage":"https://github.com/trunkcode/detect-external-link#readme","runkitExampleFilename":"runkitExample.js","devDependencies":{"@typescript-eslint/eslint-plugin":"6.7.3","eslint":"8.50.0","mocha":"10.2.0","tsd":"0.29.0","typescript":"5.2.2"},"gitHead":"4a001fd3d3b7459a2f629823662679f7fd34884c","_id":"detect-external-link@2.0.0","_nodeVersion":"20.7.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-eLyB45f/GFiq1SD77R0k0T+HiI1NK50t0DJ5H2hi8/ZniwcywzQNfwhpccfuUH5ra9F4aZa3XMEWV8tRrp3Uvg==","shasum":"a052fc230d2b0f3b414076105d77dec1f399ba90","tarball":"https://registry.npmjs.org/detect-external-link/-/detect-external-link-2.0.0.tgz","fileCount":8,"unpackedSize":8072,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHalSOMr+yNNkyYxT8qK3hW04AV4wtgcoOEHDLBB5MeLAiAClOFz2gZQRzyJ3ALjJ23xQ6clcHZ0k0JSSd39AliGwg=="}]},"_npmUser":{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"},"directories":{},"maintainers":[{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-external-link_2.0.0_1695813624102_0.6303092318293697"},"_hasShrinkwrap":false},"2.0.1":{"name":"detect-external-link","description":"Node.js plugin that analyzes the given link and determines if the URL is internal or external.","version":"2.0.1","exports":{".":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts"}},"types":"dist/esm/index.d.ts","main":"dist/cjs/index.js","module":"dist/esm/index.js","scripts":{"build":"rm -rf dist/* && tsc -p tsconfig-esm.json && tsc -p tsconfig-cjs.json && bash fixup","lint":"eslint src","lint:fix":"eslint src --fix","test":"npm run test:link && npm run test:tsd","test:link":"mocha test/link.js","test:tsd":"npx tsd"},"repository":{"type":"git","url":"git+https://github.com/trunkcode/detect-external-link.git"},"keywords":["detection","external-link"],"author":{"name":"TrunkCode","email":"support@trunkcode.com"},"license":"MIT","bugs":{"url":"https://github.com/trunkcode/detect-external-link/issues"},"homepage":"https://github.com/trunkcode/detect-external-link#readme","runkitExampleFilename":"runkitExample.js","devDependencies":{"@typescript-eslint/eslint-plugin":"6.7.3","eslint":"8.50.0","mocha":"10.2.0","tsd":"0.29.0","typescript":"5.2.2"},"gitHead":"8b78a9fea73056b846f217a579cce3ca4d7e9535","_id":"detect-external-link@2.0.1","_nodeVersion":"20.7.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-q1geB6Hbd/q2ruRckXZhzj0XIAbeyVnlai9ZQybCxIApcyv1JMXi+IGhAAWYViIa9PumWD9IOk9cvB8PSKsClQ==","shasum":"1df5e9e54fbfbc5ca52d82a8da97797a7ff1d64b","tarball":"https://registry.npmjs.org/detect-external-link/-/detect-external-link-2.0.1.tgz","fileCount":12,"unpackedSize":8177,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjCtyklnssRYOhdbBKjcBd6VbnBmQcCxAEeyjT5hbedAiB4WaDOic2udOvSKVkjz1oJYTYY37veCh+/iMx+xM96gw=="}]},"_npmUser":{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"},"directories":{},"maintainers":[{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-external-link_2.0.1_1695816054380_0.4089906763964548"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-25T12:14:44.566Z","1.0.0":"2023-07-25T12:14:44.789Z","modified":"2023-09-27T12:00:54.739Z","1.0.1":"2023-07-26T07:47:10.977Z","1.0.2":"2023-08-25T07:02:19.270Z","2.0.0":"2023-09-27T11:20:24.267Z","2.0.1":"2023-09-27T12:00:54.561Z"},"maintainers":[{"name":"samiahmedsiddiqui","email":"sami@trunkcode.com"}],"description":"Node.js plugin that analyzes the given link and determines if the URL is internal or external.","homepage":"https://github.com/trunkcode/detect-external-link#readme","keywords":["detection","external-link"],"repository":{"type":"git","url":"git+https://github.com/trunkcode/detect-external-link.git"},"author":{"name":"TrunkCode","email":"support@trunkcode.com"},"bugs":{"url":"https://github.com/trunkcode/detect-external-link/issues"},"license":"MIT","readme":"# detect-external-link\n\n[![NPM version][npm-image]][npm-url]\n[![Downloads][downloads-image]][npm-url]\n[![AppVeyor Build Status][appveyor-image]][appveyor-url]\n[![Downloads][jsdelivr-image]][jsdelivr-url]\n\nJavaScript plugin that analyzes the given link and determines if the URL is internal or external. To ensure accuracy, please include a list of specified hosts that should be marked as internal. This way, the plugin can effectively differentiate between internal and external links based on the provided hosts list.\n\n## Install\n\nVia `npm`\n\n```bash\nnpm install detect-external-link\n```\n\nVia Yarn\n\n```bash\nyarn add detect-external-link\n```\n\nFor vanilla HTML in modern browsers, import `detect-external-link` from jsDelivr:\n\n```html\n<script type=\"module\">\nimport detectExternalLink from 'https://cdn.jsdelivr.net/npm/detect-external-link@2/+esm';\n\nconsole.log(detectExternalLink('http://test.example2.com/test/abc/', {\n  'hosts': [\n    'http://example.com',\n    'http://test.example.com'\n  ]\n}));\n</script>\n```\n## Usage\n\n```javascript\nimport detectExternalLink from '/js/index.js';\n\nconst link = 'http://test.example2.com/test/abc/';\nconst linkOptions = {\n  'hosts': [\n    'http://example.com',\n    'http://test.example.com'\n  ]\n};\n\nconsole.log(detectExternalLink(link, linkOptions));\n```\n\n## Parameters\n\n| Attributes |  Type | Required | Default |                 Description                |\n|:----------:|:-----:|:--------:|:-------:|:------------------------------------------:|\n|    hosts   | Array |    Yes   |    []   | Site hostname(s) to detect external links. |\n\n[npm-image]: https://img.shields.io/npm/v/detect-external-link.svg\n[npm-url]: https://www.npmjs.com/package/detect-external-link\n[downloads-image]: https://img.shields.io/npm/dm/detect-external-link.svg\n\n[appveyor-url]: https://ci.appveyor.com/project/trunkcode/detect-external-link\n[appveyor-image]: https://img.shields.io/appveyor/ci/trunkcode/detect-external-link.svg?label=appveyor\n\n[jsdelivr-image]: https://img.shields.io/jsdelivr/npm/hm/detect-external-link\n[jsdelivr-url]: https://www.jsdelivr.com/package/npm/detect-external-link\n","readmeFilename":"README.md"}