mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
12 lines
246 B
TypeScript
12 lines
246 B
TypeScript
import is from '@sindresorhus/is';
|
|
|
|
export function coerceArray<T>(input: T[] | null | undefined): T[] {
|
|
if (is.array(input)) {
|
|
return input;
|
|
}
|
|
return [];
|
|
}
|
|
|
|
export function sortNumeric(a: number, b: number): number {
|
|
return a - b;
|
|
}
|