Thanks to visit codestin.com Credit goes to github.com
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 43d1c1a commit aeeb94eCopy full SHA for aeeb94e
src/utils/clean-cid.js
@@ -7,6 +7,9 @@ module.exports = function (cid) {
7
if (Buffer.isBuffer(cid)) {
8
cid = bs58.encode(cid)
9
}
10
+ if (CID.isCID(cid)) {
11
+ cid = cid.toBaseEncodedString()
12
+ }
13
if (typeof cid !== 'string') {
14
throw new Error('unexpected cid type: ' + typeof cid)
15
0 commit comments