✏️ 正在编辑: pulse-till-done.js
路径:
/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/utils/pulse-till-done.js
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
const log = require('./log-shim.js') let pulseTimer = null const withPromise = async (promise) => { pulseStart() try { return await promise } finally { pulseStop() } } const pulseStart = () => { pulseTimer = pulseTimer || setInterval(() => { log.gauge.pulse('') }, 150) } const pulseStop = () => { clearInterval(pulseTimer) pulseTimer = null } module.exports = { withPromise, }
💾 保存文件
← 返回文件管理器