Skip to content

Commit

Permalink
feat: add class-is module
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Oct 4, 2018
1 parent bd1dc9b commit 6513a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"dependencies": {
"async": "^2.6.1",
"class-is": "^1.1.0",
"libp2p-crypto": "~0.13.0",
"lodash": "^4.17.10",
"multihashes": "~0.4.13"
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const mh = require('multihashes')
const crypto = require('libp2p-crypto')
const assert = require('assert')
const waterfall = require('async/waterfall')
const withIs = require('class-is')

class PeerId {
constructor (id, privKey, pubKey) {
Expand Down Expand Up @@ -132,7 +133,7 @@ class PeerId {
}
}

exports = module.exports = PeerId
exports = module.exports = withIs(PeerId, { className: 'PeerId', symbolName: '@libp2p/js-peer-id/PeerId' })

// generation
exports.create = function (opts, callback) {
Expand Down

0 comments on commit 6513a02

Please sign in to comment.