chore: bump dependencies, added script to download live2d sdk
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { stat } from 'node:fs/promises'
|
||||
|
||||
export async function exists(path: string) {
|
||||
try {
|
||||
await stat(path)
|
||||
return true
|
||||
}
|
||||
catch (error) {
|
||||
if (!(error instanceof Error))
|
||||
throw error
|
||||
if (!('code' in error))
|
||||
throw error
|
||||
if (error.code !== 'ENOENT')
|
||||
throw error
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user