From b119a8c8e84f182fb4094a06ebaea44b53c61716 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 8 Jul 2023 11:34:56 +0100 Subject: [PATCH] refactor(schemes): convert unused capture group to non-capture group (#66) --- lib/schemes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/schemes.js b/lib/schemes.js index 727a174..c5cd478 100644 --- a/lib/schemes.js +++ b/lib/schemes.js @@ -1,7 +1,7 @@ 'use strict' const UUID_REG = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/ -const URN_REG = /([A-Za-z0-9][A-Za-z0-9-]{0,31}):(([A-Za-z0-9()+,\-.:=@;$_!*']|%[0-9A-Fa-f]{2})+)/ +const URN_REG = /([A-Za-z0-9][A-Za-z0-9-]{0,31}):((?:[A-Za-z0-9()+,\-.:=@;$_!*']|%[0-9A-Fa-f]{2})+)/ function isSecure (wsComponents) { return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === 'wss'