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

Commit a67abcc

Browse files
vasco-santosjacobheun
authored andcommitted
feat: add class-is to topology (#11)
1 parent 21d8ae6 commit a67abcc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/topology/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict'
22

3+
const withIs = require('class-is')
4+
35
const noop = () => {}
46

57
class Topology {
@@ -41,4 +43,4 @@ class Topology {
4143
}
4244
}
4345

44-
module.exports = Topology
46+
module.exports = withIs(Topology, { className: 'Topology', symbolName: '@libp2p/js-interfaces/topology' })

src/topology/multicodec-topology.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict'
22

33
const assert = require('assert')
4+
const withIs = require('class-is')
5+
46
const Topology = require('./index')
57

68
class MulticodecTopology extends Topology {
@@ -90,4 +92,4 @@ class MulticodecTopology extends Topology {
9092
}
9193
}
9294

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

0 commit comments

Comments
 (0)