Skip to content

Simple yet powerful RPC client built on top of postMessage.

License

Notifications You must be signed in to change notification settings

exbotanical/paper-cups

Repository files navigation

paper-cups

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.

Coverage Status Continuous Deployment Continuous Integration npm version License: MIT

Table of Contents

Installation

npm:

npm install paper-cups

yarn:

yarn add paper-cups

pnpm:

pnpm add paper-cups

Supported Environments

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';

Documentation

Full documentation can be found here