Simple yet powerful RPC client built on top of postMessage.
- Execute both blocking and non-blocking atomic request/response transactions.
- Full type safety and contract validation.
- Automatic event listener cleanup and finalization.
- Fast serialization with support for circular references.
- Built-in logging.
npm:
npm install paper-cups
yarn:
yarn add paper-cups
pnpm:
pnpm add paper-cups
paper-cups
currently supports UMD, CommonJS (node versions >= 10), and ESM build-targets
Commonjs:
const { RpcClient } = require('paper-cups');
ESM:
import { RpcClient } from 'paper-cups';
Full documentation can be found here