@fluxhub/fluxhub-lib 1.0.223 → 1.0.224

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.
@@ -11685,23 +11685,37 @@
11685
11685
  * @param {?} k
11686
11686
  * @param {?} obj
11687
11687
  * @param {?=} crypt
11688
+ * @param {?=} json_format
11688
11689
  * @return {?}
11689
11690
  */
11690
11691
  LocalDBService.prototype.write = /**
11691
11692
  * @param {?} k
11692
11693
  * @param {?} obj
11693
11694
  * @param {?=} crypt
11695
+ * @param {?=} json_format
11694
11696
  * @return {?}
11695
11697
  */
11696
- function (k, obj, crypt) {
11698
+ function (k, obj, crypt, json_format) {
11697
11699
  if (crypt === void 0) {
11698
11700
  crypt = true;
11699
11701
  }
11700
- if (crypt)
11701
- this.ngf.setItem(k, this.uti.encrypt_v2(JSON.stringify(obj))).then(function (dt) {
11702
- });
11703
- else
11704
- this.ngf.setItem(k, JSON.stringify(obj));
11702
+ if (json_format === void 0) {
11703
+ json_format = true;
11704
+ }
11705
+ if (crypt) {
11706
+ if (json_format)
11707
+ this.ngf.setItem(k, this.uti.encrypt_v2(encodeURIComponent(JSON.stringify(obj)))).then(function (dt) {
11708
+ });
11709
+ else
11710
+ this.ngf.setItem(k, this.uti.encrypt_v2((obj))).then(function (dt) {
11711
+ });
11712
+ }
11713
+ else {
11714
+ if (json_format)
11715
+ this.ngf.setItem(k, encodeURIComponent(JSON.stringify(obj)));
11716
+ else
11717
+ this.ngf.setItem(k, (obj));
11718
+ }
11705
11719
  };
11706
11720
  /**
11707
11721
  * @param {?} k