498090
node.js中使用console.log打印比较长的数据,后面的数据会使用省略号。如下:
<Buffer 04 00 00 8d 11 0b 01 ........>
谁知道能将所有数据都打印出来,谢谢!
ps:不想使用toString(),就是想看这种十六进制的数据!!
node.js中使用console.log打印比较长的数据,后面的数据会使用省略号。如下:
<Buffer 04 00 00 8d 11 0b 01 ........>
谁知道能将所有数据都打印出来,谢谢!
ps:不想使用toString(),就是想看这种十六进制的数据!!
随便在网上找了一段:
var buf = new Buffer(new Array(100).join('abc'));
var arr = new Array();
for (var i = 0; i < buf.length; i++) {
arr.push(buf[i].toString(16));
}
console.log(arr.join(' '));