This commit is contained in:
bietiaop 2024-07-08 22:17:31 +08:00
parent 0c72964b12
commit 51fb65cdb4
11 changed files with 313 additions and 56 deletions

6
utils/file.js Normal file
View file

@ -0,0 +1,6 @@
import fs from 'fs';
export function checkFolderExistAndCreate(folderPath) {
if (!fs.existsSync(folderPath)) {
fs.mkdirSync(folderPath, { recursive: true });
}
}

View file

@ -4,3 +4,5 @@ export const converSecondsToHM = seconds => {
const mm = d.getUTCMinutes();
return [hh, mm];
};
export const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));