MCPcopy Create free account
hub / github.com/expo/expo / arrayize

Function arrayize

tools/src/Utils.ts:138–143  ·  view source on GitHub ↗
(value: T | T[])

Source from the content-addressed store, hash-verified

136 * Ensures the value is an array.
137 */
138export function arrayize<T>(value: T | T[]): T[] {
139 if (Array.isArray(value)) {
140 return value;
141 }
142 return value != null ? [value] : [];
143}
144
145export function sanitizeTerminalOutput(input: string): string {
146 return stripVTControlCharacters(input).replace(/[\x00-\x08\x0B-\x1F\x7F-\x9F]/g, '');

Callers 3

searchFilesAsyncFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…