feat: add download metadata to website (#6034)
* feat: add download metadata to website * add to project cards
This commit is contained in:
@@ -8,6 +8,15 @@ export function queryAsString(query: LocationQueryValue | LocationQueryValue[]):
|
||||
return Array.isArray(query) ? (query[0] ?? null) : (query ?? null)
|
||||
}
|
||||
|
||||
export function queryAsStringArray(
|
||||
query: LocationQueryValue | LocationQueryValue[],
|
||||
): string | null {
|
||||
if (query === undefined || query === null) {
|
||||
return []
|
||||
}
|
||||
return Array.isArray(query) ? query.map(String) : [String(query)]
|
||||
}
|
||||
|
||||
export function routeNameAsString(name: RouteRecordNameGeneric | undefined): string | undefined {
|
||||
return name && typeof name === 'string' ? (name as string) : undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user