@azrico/webobject 1.2.15 → 1.2.17

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.
@@ -57,6 +57,7 @@ export declare class ObjectManager<ObjType extends SimpleObject> {
57
57
  getID(): string;
58
58
  event_run(eventName: string, ...params: any): Promise<void>;
59
59
  event_use(name: string, runEvent: (...inputdata: any) => any, onlyOn?: any, runOnce?: boolean): any;
60
+ event_remove(name: string, uname: string): boolean;
60
61
  event_add(name: string, uname: string, runEvent: (...inputdata: any) => any, onlyOn?: any, runOnce?: boolean): Promise<void>;
61
62
  events_stop(): void;
62
63
  events_clear(): void;
@@ -435,6 +435,11 @@ var ObjectManager = /*#__PURE__*/function () {
435
435
  var runOnce = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
436
436
  return _event.EventManager.use(this, name, runEvent, onlyOn, runOnce);
437
437
  }
438
+ }, {
439
+ key: "event_remove",
440
+ value: function event_remove(name, uname) {
441
+ return _event.EventManager.remove(this, name, uname);
442
+ }
438
443
  }, {
439
444
  key: "event_add",
440
445
  value: function () {
@@ -514,13 +514,13 @@ var SimpleObject = /*#__PURE__*/function (_MapableObject) {
514
514
  if (Array.isArray(this.__changeables)) {
515
515
  //console.log("chk", this.__changeables, "for changes");
516
516
  return this.__changeables.find(function (c) {
517
- return _this2[c] !== orig[c];
517
+ return !(0, _object.object_equals)(_this2[c], orig[c]);
518
518
  }) != undefined;
519
519
  } else {
520
520
  /* check all fields */
521
521
  for (var key in this) {
522
522
  if (key.startsWith("__")) continue;
523
- if (this[key] !== orig[key]) return true;
523
+ if (!(0, _object.object_equals)(this[key], orig[key])) return true;
524
524
  }
525
525
 
526
526
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azrico/webobject",
3
- "version": "1.2.15",
3
+ "version": "1.2.17",
4
4
  "description": "Stateful object",
5
5
  "author": "Azrideus",
6
6
  "license": "MIT",