MCPcopy Create free account
hub / github.com/monkeytypegame/monkeytype / findByName

Function findByName

backend/src/dal/user.ts:283–290  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

281}
282
283export async function findByName(name: string): Promise<DBUser | undefined> {
284 const found = await getUsersCollection().findOne(
285 { name },
286 { collation: { locale: "en", strength: 1 } },
287 );
288
289 return found ?? undefined;
290}
291
292export async function isNameAvailable(
293 name: string,

Callers 2

isNameAvailableFunction · 0.85
getUserByNameFunction · 0.85

Calls 1

getUsersCollectionFunction · 0.85

Tested by

no test coverage detected