Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
feat: add nodejs.util.inspect.custom
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers authored and vmx committed Mar 24, 2020
1 parent 77292ef commit fe953c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ class CID {
return str
}

/**
* CID(QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n)
*
* @returns {String}
*/
[Symbol.for('nodejs.util.inspect.custom')] () {
return 'CID(' + this.toString() + ')'
}

toString (base) {
return this.toBaseEncodedString(base)
}
Expand Down

0 comments on commit fe953c1

Please sign in to comment.