Plain Remote Procedure Call over WebSocket for Node.js (>=18.18.2) and modern browsers. Current stable version: 2.0.0-alpha.23 (pre-release). Enables bidirectional RPC where both client and server can expose functions callable via await. Features custom modelResolvers and functionResolvers, and allows custom WebSocket implementations. Peer dependency on ws (^8.5.0 || ^7.5.0). Differentiators: symmetric call pattern, native async/await, no code generation. Pre-release with potential breaking changes.
npm install prpcowNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic server setup with PRPCOW and ws, registering a function, and making a bidirectional call from client.
Update to new class-based API; see migration guide or tests.
Upgrade Node.js to >=18.18.2 or use prpcow v1.x (if available).
Run 'npm install ws' in backend project. For browser usage, ensure WebSocket API available.
Always call connect on server side with the WebSocket instance, or use PRPCOWClient on client side.
Update ws to v8.x in package.json.
Run 'npm install prpcow' and use correct import syntax (ESM).
Change to 'import { PRPCOW } from 'prpcow'Install ws: 'npm install ws'
Call rpc.connect(ws) when a new WebSocket connection is established.
Ensure correct import and instantiation: const client = new PRPCOWClient(ws);