MCPcopy
hub / github.com/Splidejs/splide / toArray

Function toArray

src/js/utils/array/toArray/toArray.ts:11–13  ·  view source on GitHub ↗
( value: T | T[] )

Source from the content-addressed store, hash-verified

9 * @return An array containing the value, or the value itself if it is already an array.
10 */
11export function toArray<T>( value: T | T[] ): T[] {
12 return isArray( value ) ? value : [ value ];
13}

Callers 6

filterFunction · 0.90
pushFunction · 0.90
forEachFunction · 0.90
toArray.test.tsFile · 0.90
onFunction · 0.90
isFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…