Skip to content

fix: ensure skipToDate is handled uniformly (fixes #41 #42)

John Carroll requested to merge fix-41-take-2 into master

Previously, the skipToDate option was sometimes allowed to be before the most recently yielded date. This could allow moving an iterator backwards. This wasn't always allowed however and it doesn't match the behavior of generators (generates, once "done", cannot emit any more values).

This updates all code to require that "skipToDate" advance the iterator. It also adds a number of tests and fixes some bugs stemming from the old behavior.

Merge request reports