mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 15:01:49 +00:00
9 lines
167 B
TypeScript
9 lines
167 B
TypeScript
import is from '@sindresorhus/is';
|
|
|
|
export function coerceArray<T>(input: T[] | null | undefined): T[] {
|
|
if (is.array(input)) {
|
|
return input;
|
|
}
|
|
return [];
|
|
}
|