mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
Move json format functions to formatUtil (#834)
This commit is contained in:
@@ -22,3 +22,14 @@ export function formatCamelCase(str: string): string {
|
||||
// Join the words with spaces
|
||||
return processedWords.join(' ')
|
||||
}
|
||||
|
||||
export function appendJsonExt(path: string) {
|
||||
if (!path.toLowerCase().endsWith('.json')) {
|
||||
path += '.json'
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
export function trimJsonExt(path: string) {
|
||||
return path.replace(/\.json$/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user