MCPcopy
hub / github.com/blitz-js/blitz / fallbackIfUndef

Function fallbackIfUndef

packages/generator/src/prisma/field.ts:36–39  ·  view source on GitHub ↗
(defaultValue: T, input?: T)

Source from the content-addressed store, hash-verified

34}
35
36const fallbackIfUndef = <T extends any>(defaultValue: T, input?: T) => {
37 if (input === undefined) return defaultValue
38 return input
39}
40
41const defaultValueTest = /=([\w]+)$/
42const builtInGenerators = ["autoincrement", "now", "uuid", "cuid"]

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected