buf.keys()

buf.keys()


  • 返回:{Iterator}


创建并返回一个包含 Buffer 键名(索引)的迭代器。

const buf = Buffer.from('buffer');
for (var key of buf.keys()) {
    console.log(key);
}
// prints:
//   0
//   1
//   2
//   3
//   4
//   5

猜你喜欢

转载自www.cnblogs.com/lalalagq/p/9908622.html