mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 03:20:02 +08:00
9 lines
165 B
TypeScript
9 lines
165 B
TypeScript
export function firstParam(
|
|
value: string | string[] | undefined,
|
|
): string | undefined {
|
|
if (Array.isArray(value)) {
|
|
return value[0];
|
|
}
|
|
return value;
|
|
}
|