source:
node_modules/es-toolkit/dist/promise/withTimeout.mjs
| Last change on this file was a762898, checked in by , 5 months ago | |
|---|---|
|
|
| File size: 154 bytes | |
| Line | |
|---|---|
| 1 | import { timeout } from './timeout.mjs'; |
| 2 | |
| 3 | async function withTimeout(run, ms) { |
| 4 | return Promise.race([run(), timeout(ms)]); |
| 5 | } |
| 6 | |
| 7 | export { withTimeout }; |
Note:
See TracBrowser
for help on using the repository browser.
