@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.
- package/dist/index.js +4 -6
- 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
|
|
17
|
-
callbacks: Object.create(null)
|
|
18
|
-
};
|
|
16
|
+
const callbacks = Object.create(null);
|
|
19
17
|
const set = (id, fn) => {
|
|
20
|
-
|
|
18
|
+
callbacks[id] = fn;
|
|
21
19
|
};
|
|
22
20
|
const get = id => {
|
|
23
|
-
return
|
|
21
|
+
return callbacks[id];
|
|
24
22
|
};
|
|
25
23
|
const remove = id => {
|
|
26
|
-
delete
|
|
24
|
+
delete callbacks[id];
|
|
27
25
|
};
|
|
28
26
|
|
|
29
27
|
let id = 0;
|