(opcode)
| 17456 | removeHTTPWhitespace(value, false, true) |
| 17457 | ); |
| 17458 | position.position++; |
| 17459 | } |
| 17460 | return extensionList; |
| 17461 | } |
| 17462 | function isValidClientWindowBits(value) { |
| 17463 | if (value.length === 0) { |
| 17464 | return false; |
| 17465 | } |
| 17466 | for (let i = 0; i < value.length; i++) { |
| 17467 | const byte = value.charCodeAt(i); |
| 17468 | if (byte < 48 || byte > 57) { |
| 17469 | return false; |
| 17470 | } |
| 17471 | } |
| 17472 | const num = Number.parseInt(value, 10); |
| 17473 | return num >= 8 && num <= 15; |
| 17474 | } |
| 17475 | var hasIntl = typeof process.versions.icu === "string"; |
| 17476 | var fatalDecoder = hasIntl ? new TextDecoder("utf-8", { fatal: true }) : void 0; |
| 17477 | var utf8Decode = hasIntl ? fatalDecoder.decode.bind(fatalDecoder) : function(buffer) { |
| 17478 | if (isUtf8(buffer)) { |
| 17479 | return buffer.toString("utf-8"); |
| 17480 | } |
| 17481 | throw new TypeError("Invalid utf-8 received."); |
| 17482 | }; |
| 17483 | module.exports = { |
| 17484 | isConnecting, |
| 17485 | isEstablished, |
| 17486 | isClosing, |
| 17487 | isClosed, |
| 17488 | fireEvent, |
| 17489 | isValidSubprotocol, |
| 17490 | isValidStatusCode, |
| 17491 | failWebsocketConnection, |
| 17492 | websocketMessageReceived, |
| 17493 | utf8Decode, |
| 17494 | isControlFrame, |
| 17495 | isContinuationFrame, |
no test coverage detected