@easydata/crud 1.4.17 → 1.4.18

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.
@@ -309,39 +309,6 @@ var HttpRequest = /** @class */ (function () {
309
309
  }());
310
310
 
311
311
  //# sourceMappingURL=http_request.js.map
312
- ;// CONCATENATED MODULE: ../core/dist/lib/utils/string_utils.js
313
- function repeatString(str, times) {
314
- var result = "";
315
- for (var i = 0; i < times; i++) {
316
- result += str;
317
- }
318
- return result;
319
- }
320
- function reverseString(str) {
321
- return str.split("").reverse().join("");
322
- }
323
- function strEndsWith(str, symbol) {
324
- return str && str.lastIndexOf(symbol) == (str.length - symbol.length);
325
- }
326
- /**
327
- * Adds two paths and returns the result
328
- * Correctly processes leading and trailing slashes
329
- * @param path1
330
- * @param path2
331
- */
332
- function combinePath(path1, path2) {
333
- var result = path1;
334
- if (result != null && result.length > 0) {
335
- if (result.charAt(result.length - 1) != '/')
336
- result += "/";
337
- result += path2;
338
- }
339
- else {
340
- result = path2;
341
- }
342
- return result;
343
- }
344
- //# sourceMappingURL=string_utils.js.map
345
312
  ;// CONCATENATED MODULE: ../core/dist/lib/i18n/i18n.js
346
313
 
347
314
 
@@ -815,7 +782,6 @@ var i18n;
815
782
  ;// CONCATENATED MODULE: ../core/dist/lib/utils/utils.js
816
783
 
817
784
 
818
-
819
785
  var utils;
820
786
  (function (utils) {
821
787
  function getAllDataTypes() {
@@ -1138,27 +1104,26 @@ var utils;
1138
1104
  if (prfx && prfx.length > 0) {
1139
1105
  prfx += "-";
1140
1106
  }
1141
- //adding 2 random symbols
1142
- var randValue = repeatString("", 2);
1143
- ;
1144
- var maxSymbolIndex = symbols.length - 1;
1145
- randValue = replaceAtString(randValue, 0, symbols[getRandomInt(0, maxSymbolIndex)]);
1146
- randValue = replaceAtString(randValue, 1, symbols[getRandomInt(0, maxSymbolIndex)]);
1147
- //generating main ID part (64-base representation of the current value of the time ticks)
1148
- var ticksNum64 = intToNum36(getNowTicks() - magicTicks);
1149
- return prfx + randValue + ticksNum64;
1107
+ //adding 3 random symbols
1108
+ var randCharPart = symbols[getRandomInt(0, symbols.length)] +
1109
+ symbols[getRandomInt(0, symbols.length)] +
1110
+ symbols[getRandomInt(0, symbols.length)];
1111
+ var randInt = getRandomInt(0, 10000);
1112
+ //generating main ID part
1113
+ //it's a 36-base representation of some random number based on current value of ticks
1114
+ var ticksNum36 = intToNumBase(getNowTicks() - magicTicks - randInt);
1115
+ return prfx + randCharPart + ticksNum36;
1150
1116
  }
1151
1117
  utils.generateId = generateId;
1152
- function intToNum36(value) {
1153
- var targetBase = 36;
1154
- var i = 14;
1155
- var buffer = repeatString("", i);
1118
+ function intToNumBase(value, targetBase) {
1119
+ if (targetBase === void 0) { targetBase = 36; }
1120
+ var buffer = '';
1156
1121
  var rest = value;
1157
1122
  do {
1158
- buffer = replaceAtString(buffer, i--, symbols[rest % targetBase]);
1123
+ buffer = symbols[rest % targetBase] + buffer;
1159
1124
  rest = Math.floor(rest /= targetBase);
1160
1125
  } while (rest > 0);
1161
- return reverseString(buffer.trim());
1126
+ return buffer;
1162
1127
  }
1163
1128
  function squeezeMoniker(str, maxlen) {
1164
1129
  var parts = str.split('-');
@@ -1195,8 +1160,8 @@ var utils;
1195
1160
  return str;
1196
1161
  }
1197
1162
  }
1198
- function replaceAtString(str, index, value) {
1199
- return str.substr(0, index) + value + str.substr(index + value.length);
1163
+ function replaceAtString(str, index, replacement) {
1164
+ return str.substring(0, index) + replacement + str.substring(index + replacement.length);
1200
1165
  }
1201
1166
  function getRandomInt(min, max) {
1202
1167
  return Math.floor(Math.random() * (max - min)) + min;
@@ -2973,6 +2938,35 @@ var EventEmitter = /** @class */ (function () {
2973
2938
  }());
2974
2939
 
2975
2940
  //# sourceMappingURL=event_emitter.js.map
2941
+ ;// CONCATENATED MODULE: ../core/dist/lib/utils/string_utils.js
2942
+ function repeatString(str, times) {
2943
+ return str.repeat(times);
2944
+ }
2945
+ function reverseString(str) {
2946
+ return str.split("").reverse().join("");
2947
+ }
2948
+ function strEndsWith(str, symbol) {
2949
+ return str && str.lastIndexOf(symbol) == (str.length - symbol.length);
2950
+ }
2951
+ /**
2952
+ * Adds two paths and returns the result
2953
+ * Correctly processes leading and trailing slashes
2954
+ * @param path1
2955
+ * @param path2
2956
+ */
2957
+ function combinePath(path1, path2) {
2958
+ var result = path1;
2959
+ if (result != null && result.length > 0) {
2960
+ if (result.charAt(result.length - 1) != '/')
2961
+ result += "/";
2962
+ result += path2;
2963
+ }
2964
+ else {
2965
+ result = path2;
2966
+ }
2967
+ return result;
2968
+ }
2969
+ //# sourceMappingURL=string_utils.js.map
2976
2970
  ;// CONCATENATED MODULE: ../core/dist/lib/utils/liquid.js
2977
2971
  var liquid;
2978
2972
  (function (liquid) {