@krauters/debuggable
Version:
A TypeScript utility that automatically adds detailed debug logs before and after method calls in classes, simplifying the tracking of execution flow and troubleshooting.
11 lines • 513 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPostRunLog = getPostRunLog;
exports.getPreRunLog = getPreRunLog;
function getPostRunLog({ className, method, result, suffix }) {
return `Called [${className}.${method}] which returned [${JSON.stringify(result)}]${suffix}`;
}
function getPreRunLog({ args, className, method }) {
return `Calling [${className}.${method}] with args [${args.map((a) => JSON.stringify(a)).join(', ')}]`;
}
//# sourceMappingURL=utils.js.map