From 072bf5d379b691c4decd3c167a51801bad8ca2f6 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 4 Sep 2024 17:16:48 +1000 Subject: BREAKING(buffer): remove `Deno.writeAll[Sync]()` (#25407) --- runtime/js/13_buffer.js | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'runtime/js/13_buffer.js') diff --git a/runtime/js/13_buffer.js b/runtime/js/13_buffer.js index ae57fcb16..2dbe5bbf6 100644 --- a/runtime/js/13_buffer.js +++ b/runtime/js/13_buffer.js @@ -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 }; -- cgit v1.2.3