Which functions/methods do you copy from a project to another or re-code just to have them in some utils.js or utils.ts?
自己理解: 有哪些方法或者函数是你在一些 utils.js 或者 utils.ts 里面提取, 从一个项目复制到另外一个项目
彩云小译: 你会将哪些函数/方法从一个项目复制到另一个项目,或者重新编码,只是为了在一些 utils.js 或 utils.ts 中保留它们?
评论
- 一个延时脚本( This little snippet to sleep)
彩云小译: 这个小小的睡眠片段
const delay = (ms) => new Promise((r) => setTimeout(r, ms));
await delay(1000);
注: 此博客是为了锻炼自己的英语语法, 翻译的 dev.to 博客