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

Function firstNonEmpty

packages/plugins/openapi/src/sdk/backing.ts:94–95  ·  view source on GitHub ↗
(...values: readonly (string | undefined)[])

Source from the content-addressed store, hash-verified

92};
93
94const firstNonEmpty = (...values: readonly (string | undefined)[]): string | undefined =>
95 values.find((value) => value !== undefined && value.length > 0);
96
97export const extractOpenApiUpstreamMessage = (body: unknown, status: number): string => {
98 if (typeof body === "string") {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected