rvagg/node-levelup — pull request #250 by jhs (2014-06-20 18:59:00+00:00)
Title: Unambiguous "ge" and "le" options for read streams

Greater-than and less-than are a bit confusing when creating a reversed read stream. One must remember to swap the values if "reverse" is true.

On the other hand, these "greater-than or equal-to" and "less-than or equal-to" options are unambiguous. It these values (scan boundaries) make intuitive sense to humans whether the scan is a forward direction or reversed. In other words, the process of swapping start/end values is now in code rather than left to the user.

I did this in levelup, not leveldown, since this feels mostly like sugar. All it does is use the value of "reverse" to set the appropriate "start" and "end" values. It will throw an error for paradoxical situations like when a user provides both a "start" and "ge" value for a forward read stream.

/cc @hij1nx