MCPcopy Create free account
hub / github.com/Hello-Application-XH/HelloGML / defaultTo

Function defaultTo

src/utils.ts:165–167  ·  view source on GitHub ↗
(value: T | undefined | null, defaultValue: T)

Source from the content-addressed store, hash-verified

163}
164
165export function defaultTo<T>(value: T | undefined | null, defaultValue: T): T {
166 return value == null ? defaultValue : value;
167}
168
169export function get(obj: any, path: string): any {
170 return path.split(".").reduce((o, k) => o?.[k], obj);

Callers 1

handleImageGenerationsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected