将 BufferSource 转换为十六进制字符串。
需要转换的 BufferSource。
十六进制字符串。
const hex = hexFromBuffer(new Uint8Array([255, 0, 128]));console.log(hex); // 'ff0080' Copy
const hex = hexFromBuffer(new Uint8Array([255, 0, 128]));console.log(hex); // 'ff0080'
将 BufferSource 转换为十六进制字符串。