Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/element-plus-react. Element Plus for React
Something went wrong. Try again.
1234567891011import { readFile, access } from 'fs/promises'
export const readJSON = async <T = unknown>(path: string): Promise<T> => JSON.parse(await readFile(path, 'utf-8'))
export const fsExists = (path: string) => access(path).then( () => true, () => false )