WebSocket Pull Stream (v2.0.12) wraps WebSocket connections with pull-stream semantics for lightweight, efficient real-time communication. Unlike websocket-stream, it is much leaner (browserified+uglified size ~8KB vs ~79KB) and adds object mode streams, duplex (two-way) communication, and a multiplexer API for multiple streams over one WebSocket. It is isomorphic (same API for browser and Node.js) and supports both pull and flow modes. The package is in maintenance mode as of 2025, with no recent updates since 2019, but remains a minimalist alternative for pull-stream ecosystems.
npm install websocket-pull-streamNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a duplex pull-stream from a WebSocket using websocket-pull-stream, and pipe data through it.
Call the returned function: const duplex = wsps(websocket)()
Consider alternatives like ws or uWebSockets.js for active support.
Use import or dynamic import() instead of require().
Use pull-stream's pull() function to connect streams.
const duplex = wsps(websocket, { mode: 'flow' })()const duplex = wsps(websocket)(Object)
Use 'import wsps from 'websocket-pull-stream'' instead of require.
Use pull(source, duplex, sink) from pull-stream package.
const stream = wsps(websocket)()