Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/dts/lib.deno.ns.d.ts>Deno.Buffer#readSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
method Deno.Buffer.prototype.readSync
import { Deno } from "https://deno.land/x/deno@v1.28.0/cli/dts/lib.deno.ns.d.ts";
const { Buffer } = Deno;

Reads the next p.length bytes from the buffer or until the buffer is drained. Returns the number of bytes read. If the buffer has no data to return, the return is EOF (null).

Parameters

p: Uint8Array

Returns

number | null