mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-01 18:32:27 +00:00
Add shared hex normalization for comment flows
This commit is contained in:
1 parent
af8a5828dd
commit
735d67313c
6 files changed
+102
-89
No files matched your search
@@ -0,0 +1,11 @@
|
||||
export function normalizeHexString(value) {
|
||||
if (typeof value !== "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const trimmed = value.trim();
|
||||
return trimmed ? trimmed.toLowerCase() : "";
|
||||
}
|
||||
|
||||
export const normalizeHexId = normalizeHexString;
|
||||
export const normalizeHexPubkey = normalizeHexString;
|
||||
Reference in new issue
Block a user