Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

20
node_modules/es-toolkit/dist/compat/function/defer.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
//#region src/compat/function/defer.ts
/**
* Defers invoking the `func` until the current call stack has cleared. Any additional arguments are provided to func when it's invoked.
*
* @param {F} func The function to defer.
* @param {Parameters<F>} args The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
*
* @example
* defer((text) => {
* console.log(text);
* }, 'deferred');
* // => Logs 'deferred' after the current call stack has cleared.
*/
function defer(func, ...args) {
if (typeof func !== "function") throw new TypeError("Expected a function");
return setTimeout(func, 1, ...args);
}
//#endregion
exports.defer = defer;