Skip to main content
Home

@std/io@0.225.2
Built and signed on GitHub Actions

UNSTABLE: The utilities for advanced I/O operations using Reader and Writer interfaces.

This package works with DenoIt is unknown whether this package works with Cloudflare Workers, Node.js, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
94%
Published
3 months ago (0.225.2)
function writeAll
writeAll(
writer: Writer,
data: Uint8Array,
): Promise<void>

Write all the content of the array buffer (arr) to the writer (w).

Examples

Writing to stdout

import { writeAll } from "@std/io/write-all";

const contentBytes = new TextEncoder().encode("Hello World");
await writeAll(Deno.stdout, contentBytes);

Writing to file

import { writeAll } from "@std/io/write-all";

const contentBytes = new TextEncoder().encode("Hello World");
using file = await Deno.open('test.file', { write: true });
await writeAll(file, contentBytes);

Parameters

writer: Writer

The writer to write to

The data to write

Return Type

Promise<void>

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/io

Import symbol

import { writeAll } from "@std/io";
or

Import directly with a jsr specifier

import { writeAll } from "jsr:@std/io";

Add Package

pnpm i jsr:@std/io
or (using pnpm 10.8 or older)
pnpm dlx jsr add @std/io

Import symbol

import { writeAll } from "@std/io";

Add Package

yarn add jsr:@std/io
or (using Yarn 4.8 or older)
yarn dlx jsr add @std/io

Import symbol

import { writeAll } from "@std/io";

Add Package

npx jsr add @std/io

Import symbol

import { writeAll } from "@std/io";

Add Package

bunx jsr add @std/io

Import symbol

import { writeAll } from "@std/io";