UNPKG

@solarity/hardhat-migrate

Version:
29 lines 924 B
export function underline(str) { return `\u001b[4m${str}\u001b[0m`; } /* eslint-disable no-console */ export function SuppressLogs(value, _context) { return function (...args) { const originalLog = console.log; console.log = () => { }; try { const result = value.apply(this, args); // If the method returns a promise, restore logs after it settles if (result && typeof result.then === "function") { return result.finally(() => { console.log = originalLog; }); } // Sync path: restore immediately console.log = originalLog; return result; } catch (e) { // Ensure restoration on error console.log = originalLog; throw e; } }; } /* eslint-enable no-console */ //# sourceMappingURL=logging.js.map