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#readFromSync

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

Reads data from r until EOF (null) and appends it to the buffer, growing the buffer as needed. It returns the number of bytes read. If the buffer becomes too large, .readFromSync() will throw an error.

Based on Go Lang's Buffer.ReadFrom.

Returns

number