diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-09-04 17:16:48 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-04 17:16:48 +1000 |
commit | 072bf5d379b691c4decd3c167a51801bad8ca2f6 (patch) | |
tree | 0e32d1d2cc82f2ed5f4f3cc5b00b0011bd3037f5 /runtime/js/13_buffer.js | |
parent | ce6b6751028bfe08b49628a30e660ff479eded02 (diff) |
BREAKING(buffer): remove `Deno.writeAll[Sync]()` (#25407)
Diffstat (limited to 'runtime/js/13_buffer.js')
-rw-r--r-- | runtime/js/13_buffer.js | 26 |
1 files changed, 1 insertions, 25 deletions
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 }; |