MCPcopy Create free account
hub / github.com/Noumena-Network/code / getOrCreateUserID

Function getOrCreateUserID

src/utils/config.ts:1855–1864  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1853}
1854
1855export function getOrCreateUserID(): string {
1856 const config = getGlobalConfig()
1857 if (config.userID) {
1858 return config.userID
1859 }
1860
1861 const userID = randomBytes(32).toString('hex')
1862 saveGlobalConfig(current => ({ ...current, userID }))
1863 return userID
1864}
1865
1866export function recordFirstStartTime(): void {
1867 const config = getGlobalConfig()

Callers 6

getTelemetryAttributesFunction · 0.85
user.tsFile · 0.85
getAPIMetadataFunction · 0.85
logEventTo1PAsyncFunction · 0.85
datadog.tsFile · 0.85

Calls 3

getGlobalConfigFunction · 0.70
saveGlobalConfigFunction · 0.70
toStringMethod · 0.65

Tested by

no test coverage detected