CHNAGE: added size comparism

This commit is contained in:
2024-08-02 07:07:44 +02:00
parent f98a3035e1
commit 15365cfbfe
2 changed files with 25 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ export class MQTTEntity implements iMQTTEntityBase {
}
return jsonObject;
}
get size(): number {
this._size = JSON.stringify(this.toJSON()).length;
return this._size;
}
getProperty(name: string): any {
if (!this.attrs.has(name)) return;
return this[name as keyof this];