@nxtedition/deepstream.io-client-js 25.0.0 → 25.0.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/deepstream.io-client-js",
3
- "version": "25.0.0",
3
+ "version": "25.0.1",
4
4
  "description": "the javascript client for deepstream.io",
5
5
  "homepage": "http://deepstream.io",
6
6
  "type": "module",
@@ -209,9 +209,10 @@ Connection.prototype._onClose = function () {
209
209
  Connection.prototype._onMessage = function (raw) {
210
210
  if (typeof raw === 'string') {
211
211
  raw = this._encoder.encode(raw)
212
+ } else if (!utils.isNode) {
213
+ raw = new Uint8Array(raw)
212
214
  }
213
215
 
214
- raw = new Uint8Array(raw)
215
216
  const len = raw.byteLength
216
217
 
217
218
  const start = 0
@@ -224,11 +225,13 @@ Connection.prototype._onMessage = function (raw) {
224
225
  pos += headerSize
225
226
  }
226
227
 
228
+ // TODO (perf): Use numbers instead of string..
227
229
  const topic = String.fromCharCode(raw[pos++])
228
230
  pos++
229
231
 
230
232
  let action = ''
231
233
  while (pos < len && raw[pos] !== 31) {
234
+ // TODO (perf): Use numbers instead of string..
232
235
  action += String.fromCharCode(raw[pos++])
233
236
  }
234
237
  pos++