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

x/denoexec/deps.ts>io.BufWriter#write

A higher level wrapper around https://doc.deno.land/builtin/stable#Deno.run
Latest
method io.BufWriter.prototype.write
import { io } from "https://deno.land/x/denoexec@v1.1.5/deps.ts";
const { BufWriter } = io;

Writes the contents of data into the buffer. If the contents won't fully fit into the buffer, those bytes that can are copied into the buffer, the buffer is the flushed to the writer and the remaining bytes are copied into the now empty buffer.

Parameters

data: Uint8Array

Returns

Promise<number>

the number of bytes written to the buffer.