Skip to content

Commit

Permalink
fix: revert change on iterator symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
magraina committed Aug 4, 2024
1 parent b99079c commit 0b7587e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "readlines-iconv",
"version": "2.1.0",
"version": "2.1.1",
"description": "Handler that returns a file line by line with a wide range of supported encodings",
"module": "ES2020",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/ReadLinesAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class ReadLinesAsync extends ReadLines {
this.handleBuffer(buffers, bytesRead, totalBytesRead);
}

[Symbol.iterator]() {
return [][Symbol.iterator]();
[Symbol.asyncIterator]() {
return this;
}

/** Returns the next line of the file. Returns `null` in case the end of file has reached */
Expand Down
2 changes: 1 addition & 1 deletion src/ReadLinesSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ReadLinesSync extends ReadLines {
}

[Symbol.iterator]() {
return [][Symbol.iterator]();
return this;
}

/** Returns the next line of the file. Returns `null` in case the end of file has reached */
Expand Down

0 comments on commit 0b7587e

Please sign in to comment.