@stemy/ngx-utils 12.2.16 → 12.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.
@@ -498,7 +498,9 @@
498
498
  };
499
499
  ObjectUtils.getType = function (obj) {
500
500
  var regex = new RegExp("\\s([a-zA-Z]+)");
501
- return Object.prototype.toString.call(obj).match(regex)[1].toLowerCase();
501
+ var target = !obj ? null : obj.constructor;
502
+ var type = !target ? null : Reflect.getMetadata("objectType", target);
503
+ return (type || Object.prototype.toString.call(obj).match(regex)[1]).toLowerCase();
502
504
  };
503
505
  ObjectUtils.isPrimitive = function (value) {
504
506
  var type = typeof value;
@@ -758,6 +760,11 @@
758
760
  ReflectUtils.defineMetadata("factoryDependencies", dependencies, target, method);
759
761
  };
760
762
  }
763
+ function ObjectType(type) {
764
+ return function (target) {
765
+ ReflectUtils.defineMetadata("objectType", type, target);
766
+ };
767
+ }
761
768
  var PaginationItemContext = /** @class */ (function () {
762
769
  function PaginationItemContext(item, parallelItem, count, index, dataIndex) {
763
770
  this.item = item;
@@ -6306,6 +6313,7 @@
6306
6313
  exports.MinPipe = MinPipe;
6307
6314
  exports.NgxTemplateOutletDirective = NgxTemplateOutletDirective;
6308
6315
  exports.NgxUtilsModule = NgxUtilsModule;
6316
+ exports.ObjectType = ObjectType;
6309
6317
  exports.ObjectUtils = ObjectUtils;
6310
6318
  exports.ObservableUtils = ObservableUtils;
6311
6319
  exports.OpenApiService = OpenApiService;