Iterator function doesn't work
See original GitHub issueI followed your instructions in the issue #276 (you have closed it) But there is an error when using the iterator function.
Error: TypeError: this.keyv.iterator is not a function or its return value is not iterable
Code:
console.log(this.keyv.iterator()); // Return: Object [AsyncGenerator] {}
for (const [key, value] of this.keyv.iterator()) {
console.log(key, value);
};
I have tried with no specified database to use in the Keyv class and with SQLite
Issue Analytics
- State:
- Created a year ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Iterator function not working on internal variable - Stack Overflow
I'm receiving an Unresolved reference: next on currentDay() . I'm aware the answer to this question is the exact same code without next()...
Read more >Iterators and generators - JavaScript - MDN Web Docs
When called, generator functions do not initially execute their code. Instead, they return a special type of iterator, called a Generator.
Read more >4. Iterators and Generators - Python Cookbook, 3rd ... - O'Reilly
You want to take a slice of data produced by an iterator, but the normal slicing operator doesn't work. Solution. The itertools.islice() function...
Read more >Iterators - The Conservative Python 3 Porting Guide
In Python 3, the map() and filter() functions return iterators ( map or filter ... The fixers do not work properly if the...
Read more >Async iteration and generators - The Modern JavaScript Tutorial
Features that require regular, synchronous iterators, don't work with ... Generators are labelled with function* (note the star) and use ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This code doesn’t work:
This code work:
(Sorry for my bad English, I’m French)
Ok. I will look into this and figure out why this is happening.