summaryrefslogtreecommitdiff
path: root/ext/io
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-09-03 18:35:54 +1000
committerGitHub <noreply@github.com>2024-09-03 18:35:54 +1000
commit45c1737531be882947e2f62038c0b72fbac921e3 (patch)
tree4dc3336a5d6bc74b7b5190ba49e771fd00d9ff20 /ext/io
parent259752537f5c81101c47a547ae345f0863235cf6 (diff)
BREAKING(io): remove `Deno.iter[Sync]()` (#25346)
Towards #22079
Diffstat (limited to 'ext/io')
-rw-r--r--ext/io/12_io.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/ext/io/12_io.js b/ext/io/12_io.js
index 5c31c279b..6e95a9bca 100644
--- a/ext/io/12_io.js
+++ b/ext/io/12_io.js
@@ -64,48 +64,6 @@ async function copy(
return n;
}
-async function* iter(
- r,
- options,
-) {
- internals.warnOnDeprecatedApi(
- "Deno.iter()",
- new Error().stack,
- "Use `ReadableStream` instead.",
- );
- const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE;
- const b = new Uint8Array(bufSize);
- while (true) {
- const result = await r.read(b);
- if (result === null) {
- break;
- }
-
- yield TypedArrayPrototypeSubarray(b, 0, result);
- }
-}
-
-function* iterSync(
- r,
- options,
-) {
- internals.warnOnDeprecatedApi(
- "Deno.iterSync()",
- new Error().stack,
- "Use `ReadableStream` instead.",
- );
- const bufSize = options?.bufSize ?? DEFAULT_BUFFER_SIZE;
- const b = new Uint8Array(bufSize);
- while (true) {
- const result = r.readSync(b);
- if (result === null) {
- break;
- }
-
- yield TypedArrayPrototypeSubarray(b, 0, result);
- }
-}
-
function readSync(rid, buffer) {
if (buffer.length === 0) return 0;
const nread = core.readSync(rid, buffer);
@@ -338,8 +296,6 @@ const stderr = new Stderr();
export {
copy,
- iter,
- iterSync,
read,
readAll,
readAllSync,