YAWR (Yet Another WebSocket RPC) is a lightweight WebSocket RPC library for Node.js and the browser, version 2.4.1. It provides an RPCServer and RPCClient with a simple async/await API for registering and calling remote functions. Employs semantic versioning with regular releases. Key differentiators: minimal footprint, first-class TypeScript support, and no external runtime dependencies. Ships built-in types and uses ESM exports.
npm install yawrNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an RPC server on port 8080 with an 'echo' function, then connects a client and calls it.
Ensure all registered functions are async or return a Promise.
Always await client.connect() before using client.call().
Use RPCServer(port) and rely on default host. Use a reverse proxy for custom host binding.
Ensure server is started and ready before client.connect(). Use server.listen callback or await a small delay.
Use import { RPCClient } from 'yawr' and instantiate with new RPCClient(...).No dependency data recorded yet.