MCPcopy Create free account
hub / github.com/langgenius/dify / toArray

Function toArray

cli/src/http/client.ts:43–47  ·  view source on GitHub ↗
(value: T | T[] | undefined)

Source from the content-addressed store, hash-verified

41}
42
43function toArray<T>(value: T | T[] | undefined): T[] {
44 if (value === undefined)
45 return []
46 return Array.isArray(value) ? value : [value]
47}
48
49function compileState(opts: ClientOptions): ClientState {
50 const onRequest: Hook[] = []

Callers 1

compileStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected