agentcrumbs
Version:
Debug mode for any agent.
29 lines • 807 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NOOP = void 0;
const NOOP_SESSION = Object.freeze({
id: "",
name: "",
crumb: function noop() { },
end: function noop() { },
});
function noopSession(name, fn) {
if (typeof fn === "function") {
return fn(NOOP_SESSION);
}
return NOOP_SESSION;
}
exports.NOOP = Object.assign(function noop() { }, {
enabled: false,
namespace: "",
child: () => exports.NOOP,
scope: (_name, fn) => fn({ crumb: exports.NOOP, traceId: "" }),
wrap: (_name, fn) => fn,
time: function noop() { },
timeEnd: function noop() { },
snapshot: function noop() { },
assert: function noop() { },
session: noopSession,
});
Object.freeze(exports.NOOP);
//# sourceMappingURL=noop.js.map