source: node_modules/es-toolkit/dist/util/attemptAsync.js@ ba17441

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

Added visualizations

  • Property mode set to 100644
File size: 305 bytes
RevLine 
[a762898]1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5async function attemptAsync(func) {
6 try {
7 const result = await func();
8 return [null, result];
9 }
10 catch (error) {
11 return [error, null];
12 }
13}
14
15exports.attemptAsync = attemptAsync;
Note: See TracBrowser for help on using the repository browser.