]> git.codecow.com Git - libnemo.git/commitdiff
Fix hex regex.
authorChris Duncan <chris@codecow.com>
Mon, 3 Aug 2026 06:56:25 +0000 (23:56 -0700)
committerChris Duncan <chris@codecow.com>
Mon, 3 Aug 2026 06:56:25 +0000 (23:56 -0700)
src/lib/convert/hex.ts

index f148e607699611c1f8a5b1c43fc481bfe90f2aa8..df6e08c2fac50c6b6c5664822e64ff506a8d4f26 100644 (file)
@@ -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)
        },
 
        /**