BREAKING(buffer): remove Deno.writeAll[Sync]() (#25407)

This commit is contained in:
Asher Gomez 2024-09-04 17:16:48 +10:00 committed by GitHub
parent ce6b675102
commit 072bf5d379
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1 additions and 82 deletions

View file

@ -256,28 +256,4 @@ function readAllSync(r) {
return buf.bytes();
}
async function writeAll(w, arr) {
internals.warnOnDeprecatedApi(
"Deno.writeAll()",
new Error().stack,
"Use `writeAll()` from `https://jsr.io/@std/io/doc/write-all/~` instead.",
);
let nwritten = 0;
while (nwritten < arr.length) {
nwritten += await w.write(TypedArrayPrototypeSubarray(arr, nwritten));
}
}
function writeAllSync(w, arr) {
internals.warnOnDeprecatedApi(
"Deno.writeAllSync()",
new Error().stack,
"Use `writeAllSync()` from `https://jsr.io/@std/io/doc/write-all/~` instead.",
);
let nwritten = 0;
while (nwritten < arr.length) {
nwritten += w.writeSync(TypedArrayPrototypeSubarray(arr, nwritten));
}
}
export { Buffer, readAll, readAllSync, writeAll, writeAllSync };
export { Buffer, readAll, readAllSync };