Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
feat: add class-is to topology (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored and jacobheun committed Nov 15, 2019
1 parent 21d8ae6 commit a67abcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/topology/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict'

const withIs = require('class-is')

const noop = () => {}

class Topology {
Expand Down Expand Up @@ -41,4 +43,4 @@ class Topology {
}
}

module.exports = Topology
module.exports = withIs(Topology, { className: 'Topology', symbolName: '@libp2p/js-interfaces/topology' })
4 changes: 3 additions & 1 deletion src/topology/multicodec-topology.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
'use strict'

const assert = require('assert')
const withIs = require('class-is')

const Topology = require('./index')

class MulticodecTopology extends Topology {
Expand Down Expand Up @@ -90,4 +92,4 @@ class MulticodecTopology extends Topology {
}
}

module.exports = MulticodecTopology
module.exports = withIs(MulticodecTopology, { className: 'MulticodecTopology', symbolName: '@libp2p/js-interfaces/topology/multicodec-topology' })

0 comments on commit a67abcc

Please sign in to comment.