https://github.com/lvce-editor/json-rpc
JsonRpc implementation
https://github.com/lvce-editor/json-rpc
json-rpc
Last synced: 3 months 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-20T16:06:23.000Z (5 months ago)
- Last Synced: 2025-01-11T01:52:05.478Z (4 months ago)
- Topics: json-rpc
- Language: TypeScript
- Homepage:
- Size: 414 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
[](https://gitpod.io/#https://github.com/lvce-editor/json-rpc)