MCPcopy Create free account
hub / github.com/denoland/std / repeat

Function repeat

io/reader_from_stream_reader_test.ts:8–13  ·  view source on GitHub ↗
(c: string, bytes: number)

Source from the content-addressed store, hash-verified

6import { Buffer } from "./buffer.ts";
7
8function repeat(c: string, bytes: number): Uint8Array {
9 assertEquals(c.length, 1);
10 const ui8 = new Uint8Array(bytes);
11 ui8.fill(c.charCodeAt(0));
12 return ui8;
13}
14
15Deno.test("[streams] readerFromStreamReader()", async function () {
16 const chunks: string[] = ["hello", "deno", "land"];

Calls 1

assertEqualsFunction · 0.90

Tested by

no test coverage detected