Refactor keys()
and values()
internals
#13
Labels
semver-major
Changes that break backward compatibility
keys()
and values()
internals
#13
Follow-up for #12, to be tackled in a next major version. As written there:
To come up with a more DRY approach, it may help to first reduce the differences between the 3 iterators. Mainly: change the callback signature of
AbstractIterator#next()
from(err, key, value)
to(err, entry)
. Perhaps (dare I say) remove callbacks altogether.If we can then merge the 3 classes into one, or at least have a shared and reusable base class, then unit tests can probably be simplified too, not having to repeat like so:
abstract-level/test/async-iterator-test.js
Lines 23 to 37 in 7113ad1
Lastly (unrelated but I postponed it because of the
next()
callback signature and to avoid more breaking changes) perhaps renameiterator()
toentries()
.The text was updated successfully, but these errors were encountered: