Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grm/deps.ts>Buffer#keys

MTProto API Client for Deno 🦕
Go to Latest
method Buffer.prototype.keys
import { Buffer } from "https://deno.land/x/grm@v0.3.1/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>