https://github.com/exbotanical/paper-cups
Simple yet powerful RPC client built on top of postMessage.
https://github.com/exbotanical/paper-cups
events finalizationregistry rpc rpc-client weakreference
Last synced: 3 months ago
JSON representation
Simple yet powerful RPC client built on top of postMessage.
- Host: GitHub
- URL: https://github.com/exbotanical/paper-cups
- Owner: exbotanical
- License: mit
- Created: 2022-02-18T20:27:42.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-02T12:55:41.000Z (over 2 years ago)
- Last Synced: 2024-08-09T17:36:35.616Z (10 months ago)
- Topics: events, finalizationregistry, rpc, rpc-client, weakreference
- Language: TypeScript
- Homepage:
- Size: 171 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.[](https://coveralls.io/github/MatthewZito/paper-cups?branch=master)
[](https://github.com/MatthewZito/paper-cups/actions/workflows/cd.yml)
[](https://github.com/MatthewZito/paper-cups/actions/workflows/ci.yml)
[](https://badge.fury.io/js/paper-cups)
[](https://opensource.org/licenses/MIT)## Table of Contents
- [Install](#install)
- [Supported Environments](#support)
- [Documentation](#docs)npm:
```bash
npm install paper-cups
```yarn:
```bash
yarn add paper-cups
```pnpm:
```bash
pnpm add paper-cups
````paper-cups` currently supports UMD, CommonJS (node versions >= 10), and ESM build-targets
Commonjs:
```js
const { RpcClient } = require('paper-cups');
```ESM:
```js
import { RpcClient } from 'paper-cups';
```Full documentation can be found [here](https://exbotanical.github.io/paper-cups)