* Checks if a given string is a valid UUID. * Note: This is not a real UUID validation. * @param {string} uuid The string to validate as a UUID. * @returns {boolean} True if the string is a valid UUID, false otherwise.
(uuid)
| 672 | * @returns {boolean} True if the string is a valid UUID, false otherwise. |
| 673 | */ |
| 674 | function isValidUUID(uuid) { |
| 675 | const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; |
| 676 | return uuidRegex.test(uuid); |
| 677 | } |
| 678 | |
| 679 | const WS_READY_STATE_OPEN = 1; |
| 680 | const WS_READY_STATE_CLOSING = 2; |
no outgoing calls
no test coverage detected