feat: add class-is module

This commit is contained in:
Vasco Santos
2018-10-04 11:29:31 +01:00
parent bd1dc9bda0
commit 6513a02e1e
2 changed files with 3 additions and 1 deletions

View File

@@ -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) {
@@ -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) {