8 lines
162 B
TypeScript
8 lines
162 B
TypeScript
export function singleValue(input: string | string[] | undefined): string | undefined {
|
|
if (Array.isArray(input)) {
|
|
return input[0];
|
|
}
|
|
|
|
return input;
|
|
}
|