{"_id":"protomux","_rev":"297387","name":"protomux","description":"Multiplex multiple message oriented protocols over a stream","dist-tags":{"latest":"3.5.1"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2024-01-04T17:35:43.000Z","created":"2021-12-30T20:14:00.690Z","3.5.1":"2023-08-21T20:04:27.121Z","3.5.0":"2023-06-26T20:10:13.129Z","3.4.1":"2023-01-13T13:08:47.412Z","3.4.0":"2022-08-31T10:49:45.604Z","3.3.0":"2022-08-12T22:54:24.628Z","3.2.2":"2022-07-06T12:39:21.654Z","3.2.1":"2022-03-24T14:20:04.550Z","3.2.0":"2022-03-11T18:46:18.851Z","3.1.1":"2022-03-11T12:58:11.846Z","3.1.0":"2022-03-11T01:18:39.734Z","3.0.2":"2022-03-11T01:11:56.613Z","3.0.1":"2022-03-11T01:11:10.251Z","3.0.0":"2022-03-11T01:10:31.300Z","2.0.0":"2022-02-01T18:10:21.286Z","1.1.0":"2022-01-28T15:01:25.407Z","1.0.1":"2021-12-30T20:15:12.696Z","1.0.0":"2021-12-30T20:14:00.690Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"versions":{"3.5.1":{"name":"protomux","version":"3.5.1","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^6.0.0","brittle":"^3.0.0","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"ca7f9aeba40b0e042383728fa063f984028362be","_id":"protomux@3.5.1","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"3cf1f140e5813c10abc106462209fd432c3d029d","size":8105,"noattachment":false,"key":"/protomux/-/protomux-3.5.1.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.5.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.5.1_1692648266930_0.9075240357959924"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-21T20:04:27.121Z","publish_time":1692648267121,"_source_registry_name":"default","_cnpm_publish_time":1692648267121},"3.5.0":{"name":"protomux","version":"3.5.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^6.0.0","brittle":"^3.0.0","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"9c59871ed2d17314df587a7c5daf9e9cf024bb69","_id":"protomux@3.5.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"shasum":"2eaca7d6eac8735f5415f5f200a9c35f796a4e97","size":8097,"noattachment":false,"key":"/protomux/-/protomux-3.5.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.5.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.5.0_1687810212894_0.383395979947561"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-26T20:10:13.129Z","publish_time":1687810213129,"_source_registry_name":"default","_cnpm_publish_time":1687810213129},"3.4.1":{"name":"protomux","version":"3.4.1","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^6.0.0","brittle":"^3.0.0","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"131fce63d7dc123f113eacb5183ee4ea5d940abd","_id":"protomux@3.4.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"shasum":"c6ca9d4e67350f66bdcffad8430b60a14cb4d792","size":7712,"noattachment":false,"key":"/protomux/-/protomux-3.4.1.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.4.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.4.1_1673615327207_0.10123553113986894"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-13T13:08:47.412Z","publish_time":1673615327412,"_cnpm_publish_time":1673615327412},"3.4.0":{"name":"protomux","version":"3.4.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^6.0.0","brittle":"^3.0.0","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"d47fd52836cfd8d7788cc038f375541bfd367285","_id":"protomux@3.4.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"shasum":"b6269fc15c0bd22964acb6e8f68a002e1da9a370","size":7591,"noattachment":false,"key":"/protomux/-/protomux-3.4.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.4.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.4.0_1661942985450_0.9507838307327205"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-31T18:15:25.134Z","publish_time":1661942985604,"_cnpm_publish_time":1661942985604},"3.3.0":{"name":"protomux","version":"3.3.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^6.0.0","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"e00098b294d9781ab7f8b5ec094a535e23e551d2","_id":"protomux@3.3.0","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"shasum":"96ff690e44044494709967a24dfd29ad1fb50d32","size":7410,"noattachment":false,"key":"/protomux/-/protomux-3.3.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.3.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.3.0_1660344864488_0.8092035238733"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-08-12T22:54:30.564Z","publish_time":1660344864628,"_cnpm_publish_time":1660344864628},"3.2.2":{"name":"protomux","version":"3.2.2","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^6.0.0","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"699dbed87dd3769a926df4bfa30cc212bee6fd40","_id":"protomux@3.2.2","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"shasum":"d5c221f7239f843077d7ea79472dfe22e71d41b4","size":7307,"noattachment":false,"key":"/protomux/-/protomux-3.2.2.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.2.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.2.2_1657111161505_0.7161381820073325"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-06T12:49:41.570Z","publish_time":1657111161654,"_cnpm_publish_time":1657111161654},"3.2.1":{"name":"protomux","version":"3.2.1","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"734be1f07011c63e34f1c56d374a09e261eff248","_id":"protomux@3.2.1","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"401b11b3c3b066d54a7492d295e7dcc773141b0b","size":7142,"noattachment":false,"key":"/protomux/-/protomux-3.2.1.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.2.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.2.1_1648131604373_0.503494014493753"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-24T14:43:12.811Z","publish_time":1648131604550,"_cnpm_publish_time":1648131604550},"3.2.0":{"name":"protomux","version":"3.2.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"70cd098a830bccd052d5739632ccae21e818af94","_id":"protomux@3.2.0","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"ba0ef43a07cc5a100dafe501ba338140cdf3b360","size":7095,"noattachment":false,"key":"/protomux/-/protomux-3.2.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.2.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.2.0_1647024378727_0.7644930193078363"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-11T18:46:27.694Z","publish_time":1647024378851,"_cnpm_publish_time":1647024378851},"3.1.1":{"name":"protomux","version":"3.1.1","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"ab9d484ada995d10d76b86240e4ce0e1df7104b4","_id":"protomux@3.1.1","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"17345272df025a5a34676fe455086221c35a93e3","size":7086,"noattachment":false,"key":"/protomux/-/protomux-3.1.1.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.1.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.1.1_1647003491700_0.5856406349716552"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-11T12:58:16.933Z","publish_time":1647003491846,"_cnpm_publish_time":1647003491846},"3.1.0":{"name":"protomux","version":"3.1.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"90e8bc32888573e43b7e0eebf187f52a49686258","_id":"protomux@3.1.0","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"935de173a12cdc69692a1590718333866a05da51","size":6752,"noattachment":false,"key":"/protomux/-/protomux-3.1.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.1.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.1.0_1646961519486_0.9027698345517345"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-11T01:18:45.883Z","publish_time":1646961519734,"_cnpm_publish_time":1646961519734},"3.0.2":{"name":"protomux","version":"3.0.2","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"79ce9e21f8bf33f37231f568ef52e0adc35c924e","_id":"protomux@3.0.2","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"de2bc139d90650f025c2f5b4257c58c09a989877","size":6724,"noattachment":false,"key":"/protomux/-/protomux-3.0.2.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.0.2.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.0.2_1646961116444_0.21194860485626732"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-11T01:14:24.465Z","publish_time":1646961116613,"_cnpm_publish_time":1646961116613},"3.0.1":{"name":"protomux","version":"3.0.1","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","queue-tick":"^1.0.0","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"1a3d98457c5df85c5b7b997b8e64bf4c1e6bce58","_id":"protomux@3.0.1","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"6f3e8b8010ce5f34568f2909ee55b645cbd84ad9","size":6690,"noattachment":false,"key":"/protomux/-/protomux-3.0.1.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.0.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.0.1_1646961069891_0.7988269911323633"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-11T01:11:54.455Z","publish_time":1646961070251,"_cnpm_publish_time":1646961070251},"3.0.0":{"name":"protomux","version":"3.0.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"a4485f7f550690c6fc8926135c2cbb152ca0a63b","_id":"protomux@3.0.0","_nodeVersion":"16.13.2","_npmVersion":"6.14.16","dist":{"shasum":"caea8cdb24da9fc1bf596ce43173277319b3668b","size":6685,"noattachment":false,"key":"/protomux/-/protomux-3.0.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-3.0.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_3.0.0_1646961031152_0.2599457677225314"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-11T01:11:53.618Z","publish_time":1646961031300,"_cnpm_publish_time":1646961031300},"2.0.0":{"name":"protomux","version":"2.0.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"717dbd0e50b9b88130f00f731109f34fdedd22f8","_id":"protomux@2.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"shasum":"ae0e066c1f3bb47a8d996c090b260bc3d4b80dc6","size":5789,"noattachment":false,"key":"/protomux/-/protomux-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-2.0.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_2.0.0_1643739021144_0.5366326208283048"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-02-01T18:10:38.553Z","publish_time":1643739021286,"_cnpm_publish_time":1643739021286},"1.1.0":{"name":"protomux","version":"1.1.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"08f976b283d50232e29d3bffeb39a5e88de805b0","_id":"protomux@1.1.0","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"shasum":"f2973e8e9b881a341da5e1a19315e807d92f67c5","size":5539,"noattachment":false,"key":"/protomux/-/protomux-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-1.1.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_1.1.0_1643382085267_0.33254900933352105"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-28T15:01:30.612Z","publish_time":1643382085407,"_cnpm_publish_time":1643382085407},"1.0.1":{"name":"protomux","version":"1.0.1","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{"b4a":"^1.3.1","compact-encoding":"^2.5.1","safety-catch":"^1.0.1"},"devDependencies":{"@hyperswarm/secret-stream":"^5.1.4","brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"1c3c559d99a6c751b6fcd3be0c8f2a9011ace209","_id":"protomux@1.0.1","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"shasum":"d083844706f7124bcd327fb0d9e803d1d92e45e4","size":5427,"noattachment":false,"key":"/protomux/-/protomux-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-1.0.1.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_1.0.1_1640895312544_0.08519959117017395"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-30T20:15:17.183Z","publish_time":1640895312696,"_cnpm_publish_time":1640895312696},"1.0.0":{"name":"protomux","version":"1.0.0","description":"Multiplex multiple message oriented protocols over a stream","main":"index.js","dependencies":{},"devDependencies":{"brittle":"^2.0.1","standard":"^16.0.4"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/protomux.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"homepage":"https://github.com/mafintosh/protomux","gitHead":"e824628d063bf0d288c1dc80a614322efcdc62c1","_id":"protomux@1.0.0","_nodeVersion":"16.8.0","_npmVersion":"6.14.15","dist":{"shasum":"6a51238590d51c1801ddb29eff5b68136d213a86","size":5404,"noattachment":false,"key":"/protomux/-/protomux-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/protomux/download/protomux-1.0.0.tgz"},"_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/protomux_1.0.0_1640895240487_0.8507900386634135"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-30T20:14:06.148Z","publish_time":1640895240690,"_cnpm_publish_time":1640895240690}},"readme":"# protomux\n\nMultiplex multiple message oriented protocols over a stream\n\n```\nnpm install protomux\n```\n\n## Usage\n\n``` js\nconst Protomux = require('protomux')\nconst c = require('compact-encoding')\n\n// By framed stream, it has be a stream that preserves the messages, ie something that length prefixes\n// like @hyperswarm/secret-stream\n\nconst mux = new Protomux(aStreamThatFrames)\n\n// Now add some protocol channels\n\nconst cool = mux.createChannel({\n  protocol: 'cool-protocol',\n  id: Buffer.from('optional binary id'),\n  onopen () {\n    console.log('the other side opened this protocol!')\n  },\n  onclose () {\n    console.log('either side closed the protocol')\n  }\n})\n\n// And add some messages\n\nconst one = cool.addMessage({\n  encoding: c.string,\n  onmessage (m) {\n    console.log('recv message (1)', m)\n  }\n})\n\nconst two = cool.addMessage({\n  encoding: c.bool,\n  onmessage (m) {\n    console.log('recv message (2)', m)\n  }\n})\n\n// open the channel\n\ncool.open()\n\n// And send some data\n\none.send('a string')\ntwo.send(true)\n```\n\n## API\n\n#### `mux = new Protomux(stream, [options])`\n\nMake a new instance. `stream` should be a framed stream, preserving the messages written.\n\nOptions include:\n\n``` js\n{\n  // Called when the muxer wants to allocate a message that is written, defaults to Buffer.allocUnsafe.\n  alloc (size) {}\n}\n```\n\n#### `mux = Protomux.from(stream | muxer, [options])`\n\nHelper to accept either an existing muxer instance or a stream (which creates a new one).\n\n#### `const channel = mux.createChannel(opts)`\n\nAdd a new protocol channel.\n\nOptions include:\n\n``` js\n{\n  // Used to match the protocol\n  protocol: 'name of the protocol',\n  // Optional additional binary id to identify this channel\n  id: buffer,\n  // Optional encoding for a handshake\n  handshake: encoding,\n  // Optional array of messages types you want to send/receive.\n  messages: [],\n  // Called when the remote side adds this protocol.\n  // Errors here are caught and forwared to stream.destroy\n  async onopen (handshake) {},\n  // Called when the channel closes - ie the remote side closes or rejects this protocol or we closed it.\n  // Errors here are caught and forwared to stream.destroy\n  async onclose () {},\n  // Called after onclose when all pending promises has resolved.\n  async ondestroy () {}\n}\n```\n\nSessions are paired based on a queue, so the first remote channel with the same `protocol` and `id`.\n\n__NOTE__: `mux.createChannel` returns `null` if the channel should not be opened, ie it's a duplicate channel or the remote has already closed this one.\n\nIf you want multiple sessions with the same `protocol` and `id`, set `unique: false` as an option.\n\n#### `const opened = mux.opened({ protocol, id })`\n\nBoolean that indicates if the channel is opened.\n\n#### `mux.pair({ protocol, id }, callback)`\n\nRegister a callback to be called everytime a new channel is requested.\n\n#### `mux.unpair({ protocol, id })`\n\nUnregisters the pair callback.\n\n#### `channel.open([handshake])`\n\nOpen the channel.\n\n#### `const m = channel.addMessage(opts)`\n\nAdd/register a message type for a certain encoding. Options include:\n\n``` js\n{\n  // compact-encoding specifying how to encode/decode this message\n  encoding: c.binary,\n  // Called when the remote side sends a message.\n  // Errors here are caught and forwared to stream.destroy\n  async onmessage (message) { }\n}\n```\n\n#### `m.send(data)`\n\nSend a message.\n\n#### `m.onmessage`\n\nFunction that is called when a message arrives.\n\n#### `m.encoding`\n\nThe encoding for this message.\n\n#### `channel.close()`\n\nCloses the protocol channel.\n\n#### `channel.cork()`\n\nCorking the protocol channel, makes it buffer messages and send them all in a batch when it uncorks.\n\n#### `channel.uncork()`\n\nUncork and send the batch.\n\n#### `mux.cork()`\n\nSame as `channel.cork` but on the muxer instance.\n\n#### `mux.uncork()`\n\nSame as `channel.uncork` but on the muxer instance.\n\n#### `for (const channel of muxer) { ... }`\n\nThe muxer instance is iterable, so you can iterate over all the channels.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/protomux","bugs":{"url":"https://github.com/mafintosh/protomux/issues"},"license":"MIT"}