@kokimoki/app 1.0.1 → 1.0.2

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.
@@ -10,6 +10,7 @@ export declare class KokimokiTransaction {
10
10
  private _parseTarget;
11
11
  private _parsePath;
12
12
  private _getClone;
13
+ get<T>(target: T): any;
13
14
  set<T>(target: T, value: T): void;
14
15
  delete<T>(target: T): void;
15
16
  push<T>(target: T[], value: T): void;
@@ -45,6 +45,12 @@ export class KokimokiTransaction {
45
45
  }
46
46
  return this._clones.get(roomName);
47
47
  }
48
+ get(target) {
49
+ const { roomName, doc, path } = this._parseTarget(target);
50
+ const { proxyClone } = this._getClone(roomName, doc);
51
+ const { obj, key } = this._parsePath(proxyClone, path);
52
+ return obj[key];
53
+ }
48
54
  set(target, value) {
49
55
  const { roomName, doc, path } = this._parseTarget(target);
50
56
  const { proxyClone } = this._getClone(roomName, doc);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const KOKIMOKI_APP_VERSION = "1.0.1";
1
+ export declare const KOKIMOKI_APP_VERSION = "1.0.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const KOKIMOKI_APP_VERSION = "1.0.1";
1
+ export const KOKIMOKI_APP_VERSION = "1.0.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokimoki/app",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "Kokimoki app",
6
6
  "main": "dist/index.js",