@lvce-editor/json-rpc 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13,17 +13,15 @@ const JsonRpcEvent = {
13
13
  create: create$4
14
14
  };
15
15
 
16
- const state = {
17
- callbacks: Object.create(null)
18
- };
16
+ const callbacks = Object.create(null);
19
17
  const set = (id, fn) => {
20
- state.callbacks[id] = fn;
18
+ callbacks[id] = fn;
21
19
  };
22
20
  const get = id => {
23
- return state.callbacks[id];
21
+ return callbacks[id];
24
22
  };
25
23
  const remove = id => {
26
- delete state.callbacks[id];
24
+ delete callbacks[id];
27
25
  };
28
26
 
29
27
  let id = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/json-rpc",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "JsonRpc implementation",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",