feat(ai-code-review): 新增 AI 程式碼審查主程式、模組與測試

This commit is contained in:
Jeffery
2026-07-02 16:09:12 +08:00
parent 18314b88a3
commit f46dfe6258
448 changed files with 78568 additions and 16 deletions
+26
View File
@@ -0,0 +1,26 @@
module.exports = defer;
/**
* Runs provided function on next iteration of the event loop
*
* @param {function} fn - function to run
*/
function defer(fn)
{
var nextTick = typeof setImmediate == 'function'
? setImmediate
: (
typeof process == 'object' && typeof process.nextTick == 'function'
? process.nextTick
: null
);
if (nextTick)
{
nextTick(fn);
}
else
{
setTimeout(fn, 0);
}
}