Function: parseList()
parseList(
raw,transform?):string[]
Normalize a config list that may arrive as an array or as a single
comma/whitespace-separated string: split, apply transform, drop empties,
and de-duplicate (first occurrence wins).
This is the shape every allow-list / fallback-order setting in this repo
takes, because the same value can come from typed config (string[]) or from
an environment variable ("a, b c"). Pass transform to normalize entries
as they are read; it defaults to trimming.
Parameters
Section titled “Parameters”string | readonly string[] | null | undefined
transform?
Section titled “transform?”(entry) => string
Returns
Section titled “Returns”string[]
Example
Section titled “Example”parseList("docs.example.com, *.databricks.com");parseList(process.env.MODEL_FALLBACKS);parseList(raw, normalizeUrlPattern);