mirror of
https://github.com/Priler/jarvis.git
synced 2026-05-31 01:19:43 +00:00
14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
import { invoke } from "@tauri-apps/api/core"
|
|
|
|
// ### UTILITY FUNCTIONS
|
|
|
|
export function capitalizeFirstLetter(str: string): string {
|
|
if (!str) return ""
|
|
return str.charAt(0).toUpperCase() + str.slice(1)
|
|
}
|
|
|
|
export function showInExplorer(path: string): void {
|
|
invoke("show_in_folder", { path })
|
|
.catch(err => console.error("failed to open explorer:", err))
|
|
}
|