@quatrain/core 1.0.2 → 1.0.3

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.
@@ -21,6 +21,7 @@ export declare abstract class AbstractObject {
21
21
  get dataObject(): DataObjectClass<any>;
22
22
  get _(): any;
23
23
  get uri(): import("./ObjectUri").ObjectUri;
24
+ has(key: string): boolean;
24
25
  toJSON(): {
25
26
  backend: string | undefined;
26
27
  ref: string;
@@ -22,7 +22,7 @@ class AbstractObject {
22
22
  return prop.val();
23
23
  }
24
24
  else {
25
- throw new Error(`${key} is not a valid property`);
25
+ return null;
26
26
  }
27
27
  }
28
28
  get backend() {
@@ -43,6 +43,9 @@ class AbstractObject {
43
43
  get uri() {
44
44
  return this._dataObject.uri;
45
45
  }
46
+ has(key) {
47
+ return Reflect.has(this._dataObject.properties, key);
48
+ }
46
49
  toJSON() {
47
50
  var _a;
48
51
  return typeof this.uri === 'string' ? this.uri : (_a = this.uri) === null || _a === void 0 ? void 0 : _a.toJSON();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Core objects for business apps",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",