MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / userFromJson

Function userFromJson

sdk/src/credentials.ts:40–47  ·  view source on GitHub ↗
(json: string)

Source from the content-addressed store, hash-verified

38}
39
40export const userFromJson = (json: string): User | null => {
41 try {
42 const credentials = credentialsFileSchema.parse(JSON.parse(json))
43 return credentials.default ?? null
44 } catch {
45 return null
46 }
47}
48
49/**
50 * Get the config directory path based on the environment.

Callers 2

getUserCredentialsFunction · 0.70

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected