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
9 months ago (0.225.2)
function writeAllSync
writeAllSync(
writer: WriterSync,
data: Uint8Array,
): void

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

Examples

"riting to stdout

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

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

Writing to file

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

const contentBytes = new TextEncoder().encode("Hello World");
using file = Deno.openSync("test.file", { write: true });
writeAllSync(file, contentBytes);

Parameters

writer: WriterSync

The writer to write to

The data to write

Return Type

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 { writeAllSync } from "@std/io";
or

Import directly with a jsr specifier

import { writeAllSync } 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 { writeAllSync } 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 { writeAllSync } from "@std/io";

Add Package

vlt install jsr:@std/io

Import symbol

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

Add Package

npx jsr add @std/io

Import symbol

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

Add Package

bunx jsr add @std/io

Import symbol

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