chore: sync

This commit is contained in:
lencx
2022-12-22 08:59:58 +08:00
parent d513a50e27
commit 2d826c90a0
22 changed files with 116 additions and 47 deletions

4
src/utils.ts vendored
View File

@@ -48,4 +48,6 @@ export const writeJSON = async (path: string, data: Record<string, any>) => {
await writeTextFile(file, JSON.stringify(data, null, 2));
}
export const fmtDate = (date: any) => dayjs(date).format('YYYY-MM-DD HH:mm:ss');
export const fmtDate = (date: any) => dayjs(date).format('YYYY-MM-DD HH:mm:ss');
export const genCmd = (act: string) => act.replace(/\s+|\/+/g, '_').replace(/[^\d\w]/g, '').toLocaleLowerCase();