MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / normalizeIdentity

Function normalizeIdentity

packages/parser/src/formats/google-chat-takeout.ts:177–184  ·  view source on GitHub ↗
(user: GoogleChatUser | undefined)

Source from the content-addressed store, hash-verified

175}
176
177function normalizeIdentity(user: GoogleChatUser | undefined): { platformId: string; name: string } {
178 const email = user?.email?.trim().toLowerCase()
179 const name = user?.name?.trim() || email || 'Unknown'
180 return {
181 platformId: email || name.toLowerCase(),
182 name,
183 }
184}
185
186function readJson<T>(filePath: string): T {
187 return JSON.parse(fs.readFileSync(filePath, 'utf8')) as T

Callers 2

deriveChatNameFunction · 0.85
parseGoogleChatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected