MCPcopy
hub / github.com/prisma/prisma / findByKey

Function findByKey

packages/client/src/runtime/utils/validatePrismaClientOptions.ts:313–319  ·  view source on GitHub ↗
(map: Record<string, T>, key: string)

Source from the content-addressed store, hash-verified

311}
312
313function findByKey<T>(map: Record<string, T>, key: string): T | undefined {
314 const foundKey = Object.keys(map).find((mapKey) => uncapitalize(mapKey) === key)
315 if (foundKey) {
316 return map[foundKey]
317 }
318 return undefined
319}
320
321function renderOmitValidationErrors(
322 omitConfig: Record<PropertyKey, unknown>,

Callers 1

getModelOrTypeByKeyFunction · 0.85

Calls 1

uncapitalizeFunction · 0.90

Tested by

no test coverage detected