source:
node_modules/es-toolkit/dist/compat/function/defer.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 190 bytes | |
| Line | |
|---|---|
| 1 | function defer(func, ...args) { |
| 2 | if (typeof func !== 'function') { |
| 3 | throw new TypeError('Expected a function'); |
| 4 | } |
| 5 | return setTimeout(func, 1, ...args); |
| 6 | } |
| 7 | |
| 8 | export { defer }; |
Note:
See TracBrowser
for help on using the repository browser.
