mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-10 10:48:45 +00:00
7 lines
200 B
TypeScript
7 lines
200 B
TypeScript
export const messageIdFromHash = (hash: string) => {
|
|
const value = hash.startsWith("#") ? hash.slice(1) : hash
|
|
const match = value.match(/^message-(.+)$/)
|
|
if (!match) return
|
|
return match[1]
|
|
}
|