/** * @module node-opcua-utils */ export function replaceBufferWithHexDump(obj: any): any { for (const p in obj) { if (obj.hasOwnProperty(p)) { if (obj[p] instanceof Buffer) { obj[p] = "" + obj[p].toString("hex") + ""; } else if (typeof obj[p] === "object") { replaceBufferWithHexDump(obj[p]); } } } return obj; }