mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
refactor(path): remove isAbsoluteFilePath function
This commit is contained in:
parent
084685874c
commit
17cea6136a
@ -15,10 +15,6 @@ export function isFilePath(s: string): s is FilePath {
|
|||||||
return validStart && _hasFileExtension(s)
|
return validStart && _hasFileExtension(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isAbsoluteFilePath(s: string): s is FilePath {
|
|
||||||
const parsedUrl = new URL(s)
|
|
||||||
return !parsedUrl.protocol
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Cannot be relative and may not have leading or trailing slashes. It can have `index` as it's last segment. Use this wherever possible is it's the most 'general' interpretation of a slug. */
|
/** Cannot be relative and may not have leading or trailing slashes. It can have `index` as it's last segment. Use this wherever possible is it's the most 'general' interpretation of a slug. */
|
||||||
export type FullSlug = SlugLike<"full">
|
export type FullSlug = SlugLike<"full">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user