mirror of
https://gitlab.com/MisterBiggs/brain-quartz.git
synced 2025-07-22 22:31:26 +00:00
feat: support non-singleton explorer
This commit is contained in:
3
quartz/util/random.ts
Normal file
3
quartz/util/random.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export function randomIdNonSecure() {
|
||||
return Math.random().toString(36).substring(2, 8)
|
||||
}
|
@@ -65,3 +65,10 @@ export interface StaticResources {
|
||||
js: JSResource[]
|
||||
additionalHead: (JSX.Element | ((pageData: QuartzPluginData) => JSX.Element))[]
|
||||
}
|
||||
|
||||
export type StringResource = string | string[] | undefined
|
||||
export function concatenateResources(...resources: StringResource[]): StringResource {
|
||||
return resources
|
||||
.filter((resource): resource is string | string[] => resource !== undefined)
|
||||
.flat()
|
||||
}
|
||||
|
Reference in New Issue
Block a user