@flock/wirespec 0.17.13 → 0.17.15

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,17 +37,6 @@ 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.clz32 === 'undefined') {
41
- Math.clz32 = function (log, LN2) {
42
- return function (x) {
43
- var asUint = x >>> 0;
44
- if (asUint === 0) {
45
- return 32;
46
- }
47
- return 31 - (log(asUint) / LN2 | 0) | 0; // the "| 0" acts like math.floor
48
- };
49
- }(Math.log, Math.LN2);
50
- }
51
40
  if (typeof Math.log2 === 'undefined') {
52
41
  Math.log2 = function (x) {
53
42
  return Math.log(x) * Math.LOG2E;
@@ -58,11 +47,16 @@ if (typeof Math.log10 === 'undefined') {
58
47
  return Math.log(x) * Math.LOG10E;
59
48
  };
60
49
  }
61
- if (typeof String.prototype.startsWith === 'undefined') {
62
- Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
63
- position = position || 0;
64
- return this.lastIndexOf(searchString, position) === position;
65
- }});
50
+ if (typeof Math.clz32 === 'undefined') {
51
+ Math.clz32 = function (log, LN2) {
52
+ return function (x) {
53
+ var asUint = x >>> 0;
54
+ if (asUint === 0) {
55
+ return 32;
56
+ }
57
+ return 31 - (log(asUint) / LN2 | 0) | 0; // the "| 0" acts like math.floor
58
+ };
59
+ }(Math.log, Math.LN2);
66
60
  }
67
61
  if (typeof String.prototype.endsWith === 'undefined') {
68
62
  Object.defineProperty(String.prototype, 'endsWith', {value: function (searchString, position) {
@@ -75,6 +69,12 @@ if (typeof String.prototype.endsWith === 'undefined') {
75
69
  return lastIndex !== -1 && lastIndex === position;
76
70
  }});
77
71
  }
72
+ if (typeof String.prototype.startsWith === 'undefined') {
73
+ Object.defineProperty(String.prototype, 'startsWith', {value: function (searchString, position) {
74
+ position = position || 0;
75
+ return this.lastIndexOf(searchString, position) === position;
76
+ }});
77
+ }
78
78
  //endregion
79
79
  //region block: imports
80
80
  var imul_0 = Math.imul;