(milliseconds)
| 13 | } |
| 14 | |
| 15 | async function delay(milliseconds) { |
| 16 | var before = Date.now() |
| 17 | while (Date.now() < before + milliseconds) {} |
| 18 | return true |
| 19 | } |
| 20 | function convertToValidFileName(str) { |
| 21 | // 替换非法字符为下划线 |
| 22 | const invalidCharsRegex = /[\/:*?"<>|]/g |