Package Exports
- obj-multiplex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (obj-multiplex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
obj-multiplex
simple stream multiplexing for objectMode
usage
// create multiplexer
const mux = new ObjMultiplex()
// setup substreams
const streamA = mux.createStream('hello')
const streamB = mux.createStream('world')
// pipe over transport (and back)
mux.pipe(transport).pipe(mux)
// send values over the substreams
streamA.write({ thisIsAn: 'object' })
streamA.write(123)
// or pipe together normally
streamB.pipe(evilAiBrain).pipe(streamB)