taxtank-core 0.16.12 → 0.16.13

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.
@@ -1188,6 +1188,22 @@
1188
1188
  CollectionDictionary.prototype.length = function () {
1189
1189
  return this.keys.length;
1190
1190
  };
1191
+ /**
1192
+ * @Todo find a better solution to get list of the sorted keys
1193
+ * Get array of the "keys" by provided order
1194
+ */
1195
+ CollectionDictionary.prototype.getSortedKeys = function (isDesc) {
1196
+ if (isDesc === void 0) { isDesc = false; }
1197
+ return this.keys.sort(function (a, b) {
1198
+ if (a > b) {
1199
+ return !isDesc ? 1 : -1;
1200
+ }
1201
+ if (a < b) {
1202
+ return !isDesc ? -1 : 1;
1203
+ }
1204
+ return 0;
1205
+ });
1206
+ };
1191
1207
  /**
1192
1208
  * Group collection items by passed path into items object
1193
1209
  */