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

std/io/copy_n.ts>copyN

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function copyN
Deprecated
Deprecated

(will be removed after 1.0.0) Use the Web Streams API instead.

import { copyN } from "https://deno.land/std@0.220.1/io/copy_n.ts";

Copy N size at the most. If read size is lesser than N, then returns nread

Parameters

Reader

dest: Writer

Writer

size: number

Read size

Returns

Promise<number>