Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/directus/directus
/ toArray
Function
toArray
packages/utils/shared/to-array.ts:1–7 ·
view source on GitHub ↗
(val: T | T[])
Source
from the content-addressed store, hash-verified
1
export
function
toArray<T = any>(val: T | T[]): T[] {
2
if
(typeof val ===
'string'
) {
3
return
val.split(
','
) as unknown as T[];
4
}
5
6
return
Array.isArray(val) ? val : [val];
7
}
Callers
15
messageConstructor
Function · 0.90
cast
Function · 0.90
getTriggers
Function · 0.90
queryToGqlString
Function · 0.90
loadPanelData
Function · 0.90
index.ts
File · 0.90
useRelationMultiple
Function · 0.90
index.ts
File · 0.90
index.ts
File · 0.90
index.ts
File · 0.90
constructor
Method · 0.90
load
Method · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected