@esfaenza/extensions 11.2.9 → 11.2.10

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.
@@ -1268,8 +1268,11 @@
1268
1268
  /**
1269
1269
  * Blacklist dei tipi da ignorare quando si effettua l'hashing degli oggetti
1270
1270
  */
1271
- this.ObjectHashingBlacklist = ["NgForm", "ElementRef", "ExtensionsService", "ToastrService", "LocaleService", "AppState", "Router", "ActivatedRoute", "HTTPService", "Location",
1272
- "CanvasComponent", "ModalDirective", "ChangeDetectorRef", "DateService", "EventEmitter", "ViewRef_", "Subscriber", "ItemLocalization"];
1271
+ this.objBlacklist = {
1272
+ "NgForm": true, "ElementRef": true, "ExtensionsService": true, "ToastrService": true, "LocaleService": true, "AppState": true, "Router": true,
1273
+ "ActivatedRoute": true, "HTTPService": true, "Location": true, "CanvasComponent": true, "ModalDirective": true, "ChangeDetectorRef": true,
1274
+ "DateService": true, "EventEmitter": true, "ViewRef_": true, "Subscriber": true, "ItemLocalization": true
1275
+ };
1273
1276
  /**
1274
1277
  * Array dei possibili valori di un simbolo esadecimale
1275
1278
  */
@@ -1317,8 +1320,8 @@
1317
1320
  return "t";
1318
1321
  if (o === false)
1319
1322
  return "f";
1320
- if (Object.prototype.toString.call(o) === "[object Date]")
1321
- return 'd:' + (0 + o);
1323
+ if (o instanceof Date)
1324
+ return 'd:' + o.valueOf().toString();
1322
1325
  i = typeof o;
1323
1326
  if (i === "string")
1324
1327
  return "s:" + o;
@@ -1339,7 +1342,7 @@
1339
1342
  //Se è oggetto, escludo tutti quelli di sistema/inutili
1340
1343
  if (o) {
1341
1344
  var name = o.__proto__.constructor.name;
1342
- if (this.ObjectHashingBlacklist.indexOf(name) == -1) {
1345
+ if (!this.objBlacklist[name]) {
1343
1346
  for (i in o) {
1344
1347
  if (o.hasOwnProperty(i) && (level <= 2 || navigateFullDepth)) {
1345
1348
  var res = this.stringify(o[i], level + 1, navigateFullDepth);