Skip to main content
Module

x/sdeno/deps.ts>Buffer#keys

Steno on Deno. Specialized fast async file writer.
Go to Latest
method Buffer.prototype.keys
Re-export
import { Buffer } from "https://deno.land/x/sdeno@v1.0.13/deps.ts";

Creates and returns an iterator of buf keys (indices).

import { Buffer } from 'buffer';

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

for (const key of buf.keys()) {
  console.log(key);
}
// Prints:
//   0
//   1
//   2
//   3
//   4
//   5

Returns

IterableIterator<number>