File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,16 @@ export type HexLike = BytesLike;
2121 * - Has an even length.
2222 * - Contains only characters representing digits (0-9) or lowercase letters (a-f) after the "0x" prefix.
2323 *
24- * @param s - The string to validate as a hexadecimal (ccc.Hex) string.
24+ * @param v - The value to validate as a hexadecimal (ccc.Hex) string.
2525 * @returns True if the string is a valid hex string, false otherwise.
2626 */
27- export function isHex ( s : unknown ) : s is Hex {
28- if ( ! ( typeof s === "string" && s . length % 2 === 0 && s . startsWith ( "0x" ) ) ) {
27+ export function isHex ( v : unknown ) : v is Hex {
28+ if ( ! ( typeof v === "string" && v . length % 2 === 0 && v . startsWith ( "0x" ) ) ) {
2929 return false ;
3030 }
3131
32- for ( let i = 2 ; i < s . length ; i ++ ) {
33- const c = s . charAt ( i ) ;
32+ for ( let i = 2 ; i < v . length ; i ++ ) {
33+ const c = v . charAt ( i ) ;
3434 if ( ! ( ( "0" <= c && c <= "9" ) || ( "a" <= c && c <= "f" ) ) ) {
3535 return false ;
3636 }
You can’t perform that action at this time.
0 commit comments