From: Chris Duncan Date: Mon, 3 Aug 2026 06:56:25 +0000 (-0700) Subject: Fix hex regex. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=c4239818ed97091b10b1b18d256fa07d0082e3eb;p=libnemo.git Fix hex regex. --- diff --git a/src/lib/convert/hex.ts b/src/lib/convert/hex.ts index f148e60..df6e08c 100644 --- a/src/lib/convert/hex.ts +++ b/src/lib/convert/hex.ts @@ -9,7 +9,7 @@ export const hex = Object.freeze({ * @returns True if input is hex, else false */ is (input: unknown): input is Hex { - return typeof input === 'string' && /([0-9a-f]{2})+/.test(input) + return typeof input === 'string' && /^([0-9a-f]{2})+$/.test(input) }, /**