@solibo/solibo-sdk 1.0.42 → 1.0.44

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.
@@ -37,6 +37,17 @@ if (typeof Array.prototype.fill === 'undefined') {
37
37
  Object.defineProperty(TypedArray.prototype, 'fill', {value: Array.prototype.fill});
38
38
  }
39
39
  });
40
+ if (typeof Math.trunc === 'undefined') {
41
+ Math.trunc = function (x) {
42
+ if (isNaN(x)) {
43
+ return NaN;
44
+ }
45
+ if (x > 0) {
46
+ return Math.floor(x);
47
+ }
48
+ return Math.ceil(x);
49
+ };
50
+ }
40
51
  if (typeof Math.log10 === 'undefined') {
41
52
  Math.log10 = function (x) {
42
53
  return Math.log(x) * Math.LOG10E;
@@ -53,23 +64,6 @@ if (typeof Math.clz32 === 'undefined') {
53
64
  };
54
65
  }(Math.log, Math.LN2);
55
66
  }
56
- if (typeof Math.trunc === 'undefined') {
57
- Math.trunc = function (x) {
58
- if (isNaN(x)) {
59
- return NaN;
60
- }
61
- if (x > 0) {
62
- return Math.floor(x);
63
- }
64
- return Math.ceil(x);
65
- };
66
- }
67
- if (typeof String.prototype.startsWith === 'undefined') {
68
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
69
- position = position || 0;
70
- return this.lastIndexOf(searchString, position) === position;
71
- }});
72
- }
73
67
  if (typeof String.prototype.endsWith === 'undefined') {
74
68
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
75
69
  var subjectString = this.toString();
@@ -81,6 +75,12 @@ if (typeof String.prototype.endsWith === 'undefined') {
81
75
  return lastIndex !== -1 && lastIndex === position;
82
76
  }});
83
77
  }
78
+ if (typeof String.prototype.startsWith === 'undefined') {
79
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
80
+ position = position || 0;
81
+ return this.lastIndexOf(searchString, position) === position;
82
+ }});
83
+ }
84
84
  //endregion
85
85
  //region block: imports
86
86
  var imul_0 = Math.imul;