We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32a45e6 commit 20067f7Copy full SHA for 20067f7
src/index.ts
@@ -34,10 +34,13 @@
34
35
import { isIPv4, isIPv6 } from '@chainsafe/is-ip'
36
import { type Multiaddr } from '@multiformats/multiaddr'
37
-import { base64url } from 'multiformats/bases/base64'
38
import { base58btc } from 'multiformats/bases/base58'
+import { base64url } from 'multiformats/bases/base64'
39
40
-const toParts = (ma: Multiaddr) => {
+/**
41
+ * Split a multiaddr into path components
42
+ */
43
+const toParts = (ma: Multiaddr): string[] => {
44
return ma.toString().split('/').slice(1)
45
}
46
0 commit comments