refactor: hooks to be called via aicommits (#99)

This commit is contained in:
hiroki osame
2023-02-22 00:01:11 -05:00
committed by GitHub
parent 09013af5fc
commit 13b06e8c16
7 changed files with 124 additions and 107 deletions

View File

@@ -1,3 +1,4 @@
import fs from 'fs/promises';
export const fileExists = (filePath: string) => fs.access(filePath).then(() => true, () => false);
// lstat is used because this is also used to check if a symlink file exists
export const fileExists = (filePath: string) => fs.lstat(filePath).then(() => true, () => false);