fixparser-plugin-messagestore-kdb 9.4.6 → 9.4.7-87502a55
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.
|
@@ -1360,6 +1360,9 @@ var require_sender = __commonJS({
|
|
|
1360
1360
|
"use strict";
|
|
1361
1361
|
var { Duplex } = require("stream");
|
|
1362
1362
|
var { randomFillSync } = require("crypto");
|
|
1363
|
+
var {
|
|
1364
|
+
types: { isUint8Array }
|
|
1365
|
+
} = require("util");
|
|
1363
1366
|
var PerMessageDeflate2 = require_permessage_deflate();
|
|
1364
1367
|
var { EMPTY_BUFFER, kWebSocket, NOOP } = require_constants();
|
|
1365
1368
|
var { isBlob, isValidStatusCode } = require_validation();
|
|
@@ -1513,8 +1516,10 @@ var require_sender = __commonJS({
|
|
|
1513
1516
|
buf.writeUInt16BE(code, 0);
|
|
1514
1517
|
if (typeof data === "string") {
|
|
1515
1518
|
buf.write(data, 2);
|
|
1516
|
-
} else {
|
|
1519
|
+
} else if (isUint8Array(data)) {
|
|
1517
1520
|
buf.set(data, 2);
|
|
1521
|
+
} else {
|
|
1522
|
+
throw new TypeError("Second argument must be a string or a Uint8Array");
|
|
1518
1523
|
}
|
|
1519
1524
|
}
|
|
1520
1525
|
const options = {
|