mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 07:20:39 +00:00
13 lines
246 B
TypeScript
13 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;
|
|
}
|