{"name":"@multiformats/multiaddr-to-uri","version":"12.0.0","description":"Convert a Multiaddr to a URI","author":{"name":"Alan Shaw"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/multiformats/js-multiaddr-to-uri#readme","repository":{"type":"git","url":"git+https://github.com/multiformats/js-multiaddr-to-uri.git"},"bugs":{"url":"https://github.com/multiformats/js-multiaddr-to-uri/issues"},"publishConfig":{"access":"public","provenance":true},"keywords":["URL","multiaddr","toString"],"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.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","generate":"protons src/pb/peer.proto src/pb/tags.proto","build":"aegir build","test":"aegir test","test:chrome":"aegir test -t browser --cov","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 --cov","test:electron-main":"aegir test -t electron-main","release":"aegir release","docs":"aegir docs"},"dependencies":{"@multiformats/multiaddr":"^13.0.0"},"devDependencies":{"aegir":"^47.0.18"},"_id":"@multiformats/multiaddr-to-uri@12.0.0","gitHead":"ff70ede92637468f047cc8188c13329b163c473a","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-3uIEBCiy8tfzxYYBl81x1tISiNBQ7mHU4pGjippbJRoQYHzy/ZdZM/7JvTldr8pc/dzpkaNJxnsuxxlhsPOJsA==","shasum":"312c4eebeee2bf7e32e7d477b6ad4b32d3bceccb","tarball":"http://registry-npm.ywwl.com/@multiformats/multiaddr-to-uri/download/@multiformats/multiaddr-to-uri-12.0.0.tgz","fileCount":10,"unpackedSize":226886,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@multiformats%2fmultiaddr-to-uri@12.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICt747otHbXoxumc/XfXO9SsQ4FyDDmbQMc16CEwc7MaAiEAzl6mGE1zzT13agBdONesAE8LvpNJWNkW+Kb8A3o71RQ="}],"size":58082,"noattachment":false,"key":"/@multiformats/multiaddr-to-uri/-/@multiformats/multiaddr-to-uri-12.0.0.tgz"},"_npmUser":{"name":"npm-service-account-multiformats","email":"npm-service-account+multiformats@ipfs.tech"},"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-to-uri_12.0.0_1756895723998_0.5446393302191397"},"_hasShrinkwrap":false,"readme":"# @multiformats/multiaddr-to-uri\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-to-uri.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multiaddr-to-uri)\n[![CI](https://img.shields.io/github/actions/workflow/status/multiformats/js-multiaddr-to-uri/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/multiformats/js-multiaddr-to-uri/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Convert a Multiaddr to a URI\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 allows easy conversion of Multiaddrs to string URIs.\n\n## Example - Converting multiaddrs to string URIs\n\n```js\nimport { multiaddrToUri } from '@multiformats/multiaddr-to-uri'\n\nconsole.log(multiaddrToUri('/dnsaddr/protocol.ai/https'))\n// -> https://protocol.ai\n\nconsole.log(multiaddrToUri('/ip4/127.0.0.1/tcp/8080'))\n// -> http://127.0.0.1:8080\n\nconsole.log(multiaddrToUri('/ip4/127.0.0.1/tcp/8080', { assumeHttp: false }))\n// -> tcp://127.0.0.1:8080\n```\n\nNote:\n\n- When `/tcp` is the last (terminating) protocol HTTP is assumed by default (implicit `assumeHttp: true`)\n  - this means produced URIs will start with `http://` instead of `tcp://`\n  - passing `{ assumeHttp: false }` disables this behavior\n- Might be lossy - e.g. a DNSv6 multiaddr\n- Can throw if the passed multiaddr:\n  - is not a valid multiaddr\n  - is not supported as a URI e.g. circuit\n\n# Install\n\n```console\n$ npm i @multiformats/multiaddr-to-uri\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `MultiformatsMultiaddrToUri` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/@multiformats/multiaddr-to-uri/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://multiformats.github.io/js-multiaddr-to-uri>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/multiformats/js-multiaddr-to-uri/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/multiformats/js-multiaddr-to-uri/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":1756895724152,"_cnpm_publish_time":1756895724152,"dist-tags":{"latest":"12.0.0"}}