Buffer.values - Node documentation
method Buffer.values

Usage in Deno

import { type Buffer } from "node:buffer";
Buffer.values(): IterableIterator<number>

Creates and returns an iterator for buf values (bytes). This function is called automatically when a Buffer is used in a for..of statement.

import { Buffer } from 'node:buffer';

const buf = Buffer.from('buffer');

for (const value of buf.values()) {
  console.log(value);
}
// Prints:
//   98
//   117
//   102
//   102
//   101
//   114

for (const value of buf) {
  console.log(value);
}
// Prints:
//   98
//   117
//   102
//   102
//   101
//   114

Return Type

IterableIterator<number>