mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
refactor: deduplicate HEX64_REGEX to js/utils/hex.js
Moves the repeatedly defined HEX64_REGEX constant to a shared utility module to improve maintainability and consistency. Updates all consumers to import from the new location. Signed-off-by: Jules <[email protected]> Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
22fcc97672
commit
a084bb59de
23 files changed
+43
-23
No files matched your search
+2
-1
@@ -27,7 +27,7 @@ const URL_HEALTH_TIMEOUT_RETRY_MS = 5 * 60 * 1000; // 5 minutes
|
||||
export const URL_PROBE_TIMEOUT_MS = 8 * 1000; // 8 seconds
|
||||
const URL_PROBE_TIMEOUT_RETRY_MS = 15 * 1000; // 15 seconds
|
||||
|
||||
const HEX64_REGEX = /^[0-9a-f]{64}$/i;
|
||||
|
||||
|
||||
const MODERATION_OVERRIDE_STORAGE_KEY = "bitvid:moderationOverrides:v2";
|
||||
const LEGACY_MODERATION_OVERRIDE_STORAGE_KEY = "bitvid:moderationOverrides:v1";
|
||||
@@ -839,6 +839,7 @@ export function persistProfileCacheToStorage() {
|
||||
}
|
||||
|
||||
import { profileCache as unifiedProfileCache } from "./profileCache.js";
|
||||
import { HEX64_REGEX } from "../utils/hex.js";
|
||||
|
||||
export function getProfileCacheEntry(pubkey) {
|
||||
const profile = unifiedProfileCache.getProfile(pubkey);
|
||||
|
||||
Reference in new issue
Block a user