source: node_modules/es-toolkit/dist/promise/withTimeout.mjs

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 154 bytes
Line 
1import { timeout } from './timeout.mjs';
2
3async function withTimeout(run, ms) {
4 return Promise.race([run(), timeout(ms)]);
5}
6
7export { withTimeout };
Note: See TracBrowser for help on using the repository browser.