diff --git a/package.json b/package.json index fdafe7b..0f16b8c 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "pull-stream": "^3.6.2" }, "dependencies": { + "class-is": "^1.0.0", "debug": "^3.1.0", "interface-connection": "~0.3.2", "ip-address": "^5.8.9", diff --git a/src/index.js b/src/index.js index 4934d3c..b04c223 100644 --- a/src/index.js +++ b/src/index.js @@ -3,6 +3,7 @@ const net = require('net') const toPull = require('stream-to-pull-stream') const mafmt = require('mafmt') +const withIs = require('class-is') const includes = require('lodash.includes') const isFunction = require('lodash.isfunction') const Connection = require('interface-connection').Connection @@ -81,4 +82,4 @@ class TCP { } } -module.exports = TCP +module.exports = withIs(TCP, { className: 'TCP', symbolName: '@libp2p/js-libp2p-tcp/tcp' })