diff --git a/index.js b/index.js index 73fadaf..cf0b25f 100644 --- a/index.js +++ b/index.js @@ -263,6 +263,10 @@ module.exports = class Protomux { return new this(stream, opts) } + static isProtomux (mux) { + return typeof mux === 'object' && mux.isProtomux === true + } + * [Symbol.iterator] () { for (const session of this._local) { if (session !== null) yield session