@nxtedition/deepstream.io-client-js 26.0.4 → 26.0.7

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.
@@ -2,7 +2,7 @@ const NODE_ENV = typeof process !== 'undefined' && process.env && process.env.NO
2
2
  export const isNode = typeof process !== 'undefined' && process.toString() === '[object process]'
3
3
  export const isProduction = NODE_ENV === 'production'
4
4
 
5
- export function deepFreeze (o) {
5
+ export function deepFreeze(o) {
6
6
  if (isProduction) {
7
7
  return o
8
8
  }
@@ -18,7 +18,7 @@ export function deepFreeze (o) {
18
18
  return o
19
19
  }
20
20
 
21
- export function splitRev (s) {
21
+ export function splitRev(s) {
22
22
  if (!s) {
23
23
  return [-1, '00000000000000']
24
24
  }
@@ -29,7 +29,7 @@ export function splitRev (s) {
29
29
  return [ver.charAt(0) === 'I' ? Infinity : parseInt(ver, 10), s.slice(i + 1)]
30
30
  }
31
31
 
32
- export function isPlainObject (value, isPlainJSON) {
32
+ export function isPlainObject(value, isPlainJSON) {
33
33
  if (isPlainJSON) {
34
34
  return value && typeof value === 'object' && !Array.isArray(value)
35
35
  }
@@ -50,13 +50,13 @@ export function isPlainObject (value, isPlainJSON) {
50
50
  return Object.getPrototypeOf(value) === proto
51
51
  }
52
52
 
53
- export function isSameOrNewer (a, b) {
53
+ export function isSameOrNewer(a, b) {
54
54
  const [av, ar] = splitRev(a)
55
55
  const [bv, br] = splitRev(b)
56
56
  return av > bv || (av === bv && ar >= br)
57
57
  }
58
58
 
59
- export function shallowCopy (obj) {
59
+ export function shallowCopy(obj) {
60
60
  if (Array.isArray(obj)) {
61
61
  return obj.slice(0)
62
62
  }
@@ -69,7 +69,7 @@ export function shallowCopy (obj) {
69
69
  return copy
70
70
  }
71
71
 
72
- export function setTimeout (callback, timeoutDuration) {
72
+ export function setTimeout(callback, timeoutDuration) {
73
73
  if (timeoutDuration !== null) {
74
74
  return globalThis.setTimeout(callback, timeoutDuration)
75
75
  } else {
@@ -77,7 +77,7 @@ export function setTimeout (callback, timeoutDuration) {
77
77
  }
78
78
  }
79
79
 
80
- export function setInterval (callback, intervalDuration) {
80
+ export function setInterval(callback, intervalDuration) {
81
81
  if (intervalDuration !== null) {
82
82
  return setInterval(callback, intervalDuration)
83
83
  } else {
@@ -85,7 +85,7 @@ export function setInterval (callback, intervalDuration) {
85
85
  }
86
86
  }
87
87
 
88
- export function compareRev (a, b) {
88
+ export function compareRev(a, b) {
89
89
  if (!a) {
90
90
  return b ? -1 : 0
91
91
  }
@@ -116,14 +116,14 @@ export function compareRev (a, b) {
116
116
  }
117
117
 
118
118
  export class AbortError extends Error {
119
- constructor () {
119
+ constructor() {
120
120
  super('The operation was aborted')
121
121
  this.code = 'ABORT_ERR'
122
122
  this.name = 'AbortError'
123
123
  }
124
124
  }
125
125
 
126
- function defaultSchedule (fn) {
126
+ function defaultSchedule(fn) {
127
127
  setTimeout(fn, 0)
128
128
  }
129
129
 
@@ -139,7 +139,7 @@ const onAbort = function () {
139
139
  }
140
140
  }
141
141
 
142
- export function addAbortListener (signal, handler) {
142
+ export function addAbortListener(signal, handler) {
143
143
  if (!signal) {
144
144
  return
145
145
  }
@@ -157,7 +157,7 @@ export function addAbortListener (signal, handler) {
157
157
  }
158
158
  }
159
159
 
160
- export function removeAbortListener (signal, handler) {
160
+ export function removeAbortListener(signal, handler) {
161
161
  if (!signal) {
162
162
  return
163
163
  }
@@ -175,7 +175,7 @@ export function removeAbortListener (signal, handler) {
175
175
  }
176
176
  }
177
177
 
178
- export function readBigUInt64BE (buf, offset = 0) {
178
+ export function readBigUInt64BE(buf, offset = 0) {
179
179
  const first = buf[offset]
180
180
  const last = buf[offset + 7]
181
181