MCPcopy Create free account
hub / github.com/microsoft/vscode-js-debug / asArray

Function asArray

src/common/arrayUtils.ts:5–7  ·  view source on GitHub ↗
(thing: T | readonly T[])

Source from the content-addressed store, hash-verified

3 *--------------------------------------------------------*/
4
5export function asArray<T>(thing: T | readonly T[]): readonly T[] {
6 return thing instanceof Array ? thing : [thing];
7}
8
9/**
10 * Runs a binary search on the array. Returns the index of the key if it were

Callers 2

getNodeLaunchArgsFunction · 0.90
tryGetProgramFromArgsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected