MCPcopy Index your code
hub / github.com/angular/components / coerceArray

Function coerceArray

src/cdk/coercion/array.ts:12–14  ·  view source on GitHub ↗
(value: T | T[])

Source from the content-addressed store, hash-verified

10export function coerceArray<T>(value: T | T[]): T[];
11export function coerceArray<T>(value: T | readonly T[]): readonly T[];
12export function coerceArray<T>(value: T | T[]): T[] {
13 return Array.isArray(value) ? value : [value];
14}

Callers 8

isMatchedMethod · 0.90
observeMethod · 0.90
array.spec.tsFile · 0.90
_coerceValueMethod · 0.90
_toggleClassesMethod · 0.90
_addPanelClassesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected