cross-tools
Version:
Cross-platform fundamental tools for developers
1 lines • 351 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),ora_1=tslib_1.__importDefault(require("ora")),asyncLoader=(t,e="Loading...")=>new Promise(async(a,o)=>{const r=ora_1.default(e);r.start(e),await t().then((function(){r.stop(),a([...arguments])})).catch(t=>{r.stop(),o(t)})});exports.default=asyncLoader;