JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q20310F
  • License ISC

Lightweight multiplexing for pull streams

Package Exports

  • pull-plex
  • pull-plex/lib/encdec-browser.js
  • pull-plex/lib/encdec.js

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 (pull-plex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

pull-plex

Lightweight multiplexing for pull streams

demux

var plex = require('pull-plex')
var multi = plex();
var coaxial = multi(src: pull.Source) => demuxxer: pull.Through

coaxial.channel(0).pipe(snk: pull.Sink)
coaxial.channel(1).pipe(snk: pull.Sink)
coaxial.channel(2).pipe(snk: pull.Sink)

coaxial.demux(); //trigger channel pipes

mux

var plex = require('pull-plex')
var multi = plex()
multi(snk1: pull.Sink)
multi(snk2: pull.Sink)
multi(snk3: pull.Sink)
src1.pipe(multi.channel(0));
src2.pipe(multi.channel(1));
src3.pipe(multi.channel(2));

var channel4 = multi(snk1: pull.Sink)
src4.pipe(channel4)
src5.pipe(multi(snk2: pull.Sink))

multi.channels.length // 5