{"name":"@multiformats/mafmt","version":"11.0.4","description":"A multiaddr validator","license":"Apache-2.0 OR MIT","homepage":"https://github.com/multiformats/js-mafmt#readme","repository":{"type":"git","url":"git+https://github.com/multiformats/js-mafmt.git"},"bugs":{"url":"https://github.com/multiformats/js-mafmt/issues"},"keywords":["multiaddr"],"engines":{"node":">=16.0.0","npm":">=7.0.0"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"release":{"branches":["master"],"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"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-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"},"dependencies":{"@multiformats/multiaddr":"^11.0.0"},"devDependencies":{"aegir":"^37.5.3","uint8arrays":"^3.0.0","util":"^0.12.3"},"gitHead":"6589adcae3eb1692c084e7966beadf38e03a617c","_id":"@multiformats/mafmt@11.0.4","_nodeVersion":"18.14.1","_npmVersion":"8.19.4","dist":{"integrity":"sha512-j5+coLrda4e417igtPDn8Aek2JY+HXBo9w4PwnMx8fhfOE+ktFEHWTgJ9BwGMiQbonxc1CmGiUnylTdoyyt5ZQ==","shasum":"323f11fac504da77977f56a2aacc6d26cc948728","tarball":"http://registry-npm.ywwl.com/@multiformats/mafmt/download/@multiformats/mafmt-11.0.4.tgz","fileCount":8,"unpackedSize":33133,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRV2Jg6lHBBozuWmr028n6Kdda71dFAUHBN0iYlTYSgQIgLcOmgw5+0qSoTHjaJVOhLPqyHv5fbi8HxvVxSPOflAk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/O92ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqN9w/6Agb+NCjT6P+nQ5WXpRAFhhHujUaUePr6l7RMbZkmJxG+4Ram\r\npm+uj+leLFBp4rS5C1b06cX5agQgQNPc/KjToWkn+Hj2Zgr2PLzZH+BGavtP\r\nimkpIBjGuFyhVQhxEXB/JYmahXCio45npsMHscv8KZrTNoMTxdq2i19SQvnv\r\nR+f/tzA94AnBCiKmEzLpRb2pYL4kIJqDMfDApxkh/Ux8u0s8Jzn9IRegqE4G\r\nrPMq+8wZn+PFlf1fzfXOFxJVI7K2S3LWSXlrxK9jBDSq1nzbh2qgwtqGMKJQ\r\ntjONyyzaczrJpcX4tbcBr0HXoWxEB/VaZO065xWMKERf1dN3LfhxItZAPRNJ\r\n9xlg1qZgaMDmfrmPALZyOG6ZZCgG52MLzpfulF/GQYYDphEFwMeUNp7ERm83\r\nvpWKrG6gb5qrWJNHNRLhK8DkRiosbDZ/6tTWT9XRr2r0O1YsuLpOcN43k/Qm\r\nUH585e+6I3Gh9cnO5jONqgOHBMIfa1f9NsAz146D+vK3FvGOhOeXgzKyV/c8\r\na8Svv9DGhLK3iwYc5L3gnbaErADPs/QWacfNX/j30B89RM9VYseb6wA5s8Cg\r\nAdkvrbmoOajG0nz42QSDLg/qOu6PMqoJzfXylEQ5G/znMS+HWTu954iIkYgP\r\nRjwqkJ0qRS9s56L47ZoXk2jL74bGFVmryaA=\r\n=tehT\r\n-----END PGP SIGNATURE-----\r\n","size":6321,"noattachment":false,"key":"/@multiformats/mafmt/-/@multiformats/mafmt-11.0.4.tgz"},"_npmUser":{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@protocol.ai"},"directories":{},"maintainers":[{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@protocol.ai"},{"name":"alanshaw","email":"alan138@gmail.com"},{"name":"vascosantos","email":"santos.vasco10@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"lidel","email":"lidel@lidel.org"},{"name":"rvagg","email":"r@va.gg"},{"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"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mafmt_11.0.4_1677520758155_0.1359658709848608"},"_hasShrinkwrap":false,"readme":"# @multiformats/mafmt <!-- omit in toc -->\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-mafmt.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-mafmt)\n[![CI](https://img.shields.io/github/actions/workflow/status/multiformats/js-mafmt/js-test-and-release.yml?branch=master\\&style=flat-square)](https://github.com/multiformats/js-mafmt/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)\n\n> A multiaddr validator\n\n## Table of contents <!-- omit in toc -->\n\n- [Install](#install)\n  - [Browser `<script>` tag](#browser-script-tag)\n- [Usage](#usage)\n- [API](#api)\n  - - [`mafmt.<FORMAT>.matches(multiaddr)`](#mafmtformatmatchesmultiaddr)\n- [API Docs](#api-docs)\n- [License](#license)\n- [Contribution](#contribution)\n\n## Install\n\n```console\n$ npm i @multiformats/mafmt\n```\n\n### Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `MultiformatsMafmt` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/@multiformats/mafmt/dist/index.min.js\"></script>\n```\n\n## Usage\n\n```js\nimport * as mafmt from '@multiformats/mafmt'\n\nmafmt.DNS.matches('/dns4/ipfs.io') // true\n```\n\n## API\n\n#### `mafmt.<FORMAT>.matches(multiaddr)`\n\nWhere `<FORMAT>` may be:\n\n| `<FORMAT>`         | Description                                                                                                                                                                                                               | Example(s)                                                                                                                                       |\n| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `DNS`              | a \"dns4\" or \"dns6\" format multiaddr                                                                                                                                                                                       | `/dnsaddr/ipfs.io`                                                                                                                               |\n| `DNS4`             | a \"dns4\" format multiaddr                                                                                                                                                                                                 | `/dns4/ipfs.io`                                                                                                                                  |\n| `DNS6`             | a \"dns6\" format multiaddr                                                                                                                                                                                                 | `/dns6/protocol.ai/tcp/80`                                                                                                                       |\n| `IP`               | an \"ip4\" or \"ip6\" format multiaddr                                                                                                                                                                                        | `/ip4/127.0.0.1` <br> `/ip6/fc00::`                                                                                                              |\n| `TCP`              | a \"tcp\" over `IP` format multiaddr                                                                                                                                                                                        | `/ip4/0.0.7.6/tcp/1234`                                                                                                                          |\n| `UDP`              | a \"udp\" over `IP` format multiaddr                                                                                                                                                                                        | `/ip4/0.0.7.6/udp/1234`                                                                                                                          |\n| `QUIC`             | a \"quic\" over `UDP` format multiaddr                                                                                                                                                                                      | `/ip4/1.2.3.4/udp/1234/quic`                                                                                                                     |\n| `UTP`              | a \"utp\" over `UDP` format multiaddr                                                                                                                                                                                       | `/ip4/1.2.3.4/udp/3456/utp`                                                                                                                      |\n| `Websockets`       | a \"ws\" over `TCP` or \"ws\" over `DNS` format multiaddr                                                                                                                                                                     | `/ip4/1.2.3.4/tcp/3456/ws` <br> `/dnsaddr/ipfs.io/ws`                                                                                            |\n| `WebSocketsSecure` | a \"wss\" over `TCP` or \"wss\" over `DNS` format multiaddr                                                                                                                                                                   | `/ip6/::/tcp/0/wss` <br> `/dnsaddr/ipfs.io/wss`                                                                                                  |\n| `HTTP`             | a \"http\" over `TCP` or `DNS` or \"http\" over `DNS` format multiaddr                                                                                                                                                        | `/ip4/127.0.0.1/tcp/90/http` <br> `/dnsaddr/ipfs.io/http`                                                                                        |\n| `HTTPS`            | a \"https\" over `TCP` or `DNS` or \"https\" over `DNS` format multiaddr                                                                                                                                                      | `/ip4/127.0.0.1/tcp/90/https` <br> `/dnsaddr/ipfs.io/https`                                                                                      |\n| `WebRTCStar`       | a \"p2p\" over \"p2p-webrtc-star\" over `Websockets` or \"p2p\" over \"p2p-webrtc-star\" over `WebSocketsSecure` format multiaddr                                                                                                 | `/dnsaddr/ipfs.io/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4`                                                        |\n| `WebSocketStar`    | a \"p2p\" over \"p2p-websocket-star\" over `Websockets` or \"p2p\" over \"p2p-websocket-star\" over `WebSocketsSecure` or \"p2p-websocket-star\" over `Websockets` or \"p2p-websocket-star\" over `WebSocketsSecure` format multiaddr | `/ip4/1.2.3.4/tcp/3456/ws/p2p-websocket-star` <br> `/dnsaddr/localhost/ws/p2p-websocket-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4` |\n| `WebRTCDirect`     | a \"p2p-webrtc-direct\" over `HTTP` or \"p2p-webrtc-direct\" over `HTTPS` format multiaddr                                                                                                                                    | `/ip4/1.2.3.4/tcp/3456/http/p2p-webrtc-direct`                                                                                                   |\n| `Reliable`         | a `WebSockets` or `WebSocketsSecure` or `HTTP` or `HTTPS` or `WebRTCStar` or `WebRTCDirect` or `TCP` or `UTP` or `QUIC` format multiaddr                                                                                  | `/dnsaddr/ipfs.io/wss`                                                                                                                           |\n| `Circuit`          |                                                                                                                                                                                                                           | `/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj`                             |\n| `P2P`              | \"p2p\", aka \"ipfs\", over `Reliable` or `WebRTCStar` or \"p2p\" format multiaddr                                                                                                                                              | `/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4` <br> `/ip4/127.0.0.1/tcp/20008/ws/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj`      |\n\nWhere `multiaddr` may be:\n\n- a [Multiaddr](https://www.npmjs.com/package/@multiformats/multiaddr)\n- a String\n- a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)\n\nReturns `true`/`false`\n\n## API Docs\n\n- <https://multiformats.github.io/js-mafmt>\n\n## License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](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":1677520758321,"_cnpm_publish_time":1677520758321,"dist-tags":{"latest":"12.1.6"}}