{"name":"@multiformats/multiaddr-matcher","version":"3.0.2","description":"Match different multiaddr formats","license":"Apache-2.0 OR MIT","homepage":"https://github.com/multiformats/js-multiaddr-matcher#readme","repository":{"type":"git","url":"git+https://github.com/multiformats/js-multiaddr-matcher.git"},"bugs":{"url":"https://github.com/multiformats/js-multiaddr-matcher/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["multiaddr"],"type":"module","types":"./dist/src/index.d.ts","typesVersions":{"*":{"*":["*","dist/*","dist/src/*","dist/src/*/index"],"src/*":["*","dist/*","dist/src/*","dist/src/*/index"]}},"exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"},"./utils":{"types":"./dist/src/utils.d.ts","import":"./dist/src/utils.js"}},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","doc-check":"aegir doc-check","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node","test:electron-main":"aegir test -t electron-main","release":"aegir release","docs":"aegir docs"},"dependencies":{"@multiformats/multiaddr":"^13.0.0"},"devDependencies":{"aegir":"^47.0.19"},"gitHead":"805490b0ce6bb4c7a94d77abee9922e7e363a478","_id":"@multiformats/multiaddr-matcher@3.0.2","_nodeVersion":"24.14.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-iphGQJliZxe2yKu57bdRDgeS+3znc5uXtMybDO1Wau3rIjas4zjrjlyxmFz3wqyUL9f3VDQwas/ZqA7N4QeSfw==","shasum":"111700d8418118e82ca5e12d2de9098b8b97d223","tarball":"http://registry-npm.ywwl.com/@multiformats/multiaddr-matcher/download/@multiformats/multiaddr-matcher-3.0.2.tgz","fileCount":15,"unpackedSize":277994,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@multiformats%2fmultiaddr-matcher@3.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEQ+PBDULmNY+V4r02tDlN+YYOS49enacfPoJgiTPd2VAiEAooQm9MQHh68ATt/1nqMQmSzibrN9mUu3LeD2EymwNzY="}],"size":64341,"noattachment":false,"key":"/@multiformats/multiaddr-matcher/-/@multiformats/multiaddr-matcher-3.0.2.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2574ff5a-3b5c-4b41-bc3c-ba1b572ae864"}},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"vmx","email":"volker.mische@gmail.com"},{"name":"mikeal","email":"mikeal.rogers@gmail.com"},{"name":"hugomrdias","email":"hugomrdias@gmail.com"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"rvagg","email":"r@va.gg"},{"name":"lidel","email":"lidel@lidel.org"},{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@ipfs.tech"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/multiaddr-matcher_3.0.2_1775724551201_0.42813266108834824"},"_hasShrinkwrap":false,"readme":"# @multiformats/multiaddr-matcher\n\n[![multiformats.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://multiformats.io)\n[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-multiaddr-matcher.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multiaddr-matcher)\n[![CI](https://img.shields.io/github/actions/workflow/status/multiformats/js-multiaddr-matcher/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/multiformats/js-multiaddr-matcher/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Match different multiaddr formats\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nThis module exports various matchers that can be used to infer the type of a\npassed multiaddr.\n\n## Example\n\n```ts\nimport { multiaddr } from '@multiformats/multiaddr'\nimport { DNS } from '@multiformats/multiaddr-matcher'\n\nconst ma = multiaddr('/dnsaddr/example.org')\n\nDNS.matches(ma) // true - this is a multiaddr with a DNS address at the start\n```\n\n## Example\n\nThe default matching behaviour ignores any subsequent tuples in the multiaddr.\nIf you want stricter matching you can use `.exactMatch`:\n\n```ts\nimport { multiaddr } from '@multiformats/multiaddr'\nimport { DNS, Circuit } from '@multiformats/multiaddr-matcher'\n\nconst ma = multiaddr('/dnsaddr/example.org/p2p/QmFoo/p2p-circuit/p2p/QmBar')\n\nDNS.exactMatch(ma) // false - this address has extra tuples after the DNS component\nCircuit.matches(ma) // true\nCircuit.exactMatch(ma) // true - the extra tuples are circuit relay related\n```\n\n# Install\n\n```console\n$ npm i @multiformats/multiaddr-matcher\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `MultiformatsMultiaddrMatcher` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/@multiformats/multiaddr-matcher/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://multiformats.github.io/js-multiaddr-matcher>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/multiformats/js-multiaddr-matcher/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/multiformats/js-multiaddr-matcher/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","publish_time":1775724551336,"_cnpm_publish_time":1775724551336,"dist-tags":{"latest":"3.0.2"}}