@newos/cli
Version:
Command-line interface for the NewOS
22 lines • 494 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.tryAwait = exports.tryFunc = void 0;
function tryFunc(func, ifException = null) {
try {
return func();
}
catch (_) {
return ifException;
}
}
exports.tryFunc = tryFunc;
async function tryAwait(func, ifException = null) {
try {
return await func();
}
catch (_) {
return ifException;
}
}
exports.tryAwait = tryAwait;
//# sourceMappingURL=try.js.map