MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / firstDefined

Function firstDefined

packages/hosts/mcp/src/create-artifact.ts:82–83  ·  view source on GitHub ↗
(...values: Array<string | undefined>)

Source from the content-addressed store, hash-verified

80 /\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\b|\bfunction\s+([A-Za-z_$][\w$]*)\s*\(|\bclass\s+([A-Za-z_$][\w$]*)\b/g;
81
82const firstDefined = (...values: Array<string | undefined>): string | undefined =>
83 values.find((value): value is string => value !== undefined);
84
85const localDestructuredName = (part: string): string | undefined => {
86 const binding = part

Callers 1

validateArtifactCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected