Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lvce-editor/json-rpc
JsonRpc implementation
https://github.com/lvce-editor/json-rpc
json-rpc
Last synced: 3 days ago
JSON representation
JsonRpc implementation
- Host: GitHub
- URL: https://github.com/lvce-editor/json-rpc
- Owner: lvce-editor
- License: mit
- Created: 2023-12-03T14:25:09.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T09:19:16.000Z (2 months ago)
- Last Synced: 2024-09-15T11:50:28.187Z (2 months ago)
- Topics: json-rpc
- Language: TypeScript
- Homepage:
- Size: 274 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @lvce-editor/json-rpc
JsonRpc implementation.
## Install
```sh
npm install @lvce-editor/json-rpc
```## Usage
```js
import * as JsonRpc from '@lvce-editor/json-rpc'const ipc = {
send(message) {
JsonRpc.resolve(message.id, message.params[0], message.params[1])
},
}await JsonRpc.invoke(ipc, 'add', 1, 2) // returns 3
```## Gitpod
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/lvce-editor/json-rpc)