make using levelup reverse ranges easy
make reverse ranges easier to use.
Stable: Expect patches, possible features additions.
When you use reverse ranges, you have to reverse the
dbcreateReadStreamstart: 'a' end: 'z'dbcreateReadStreamstart: 'z' end: 'a' reverse: true
this is confusing and bug-ridden.
level-fix-range fixes the options so they always make sense. if you want a range to reverse, just set reverse.
var fix = require'level-fix-range'dbcreateReadStreamstart: 'a' end: 'z'dbcreateReadStreamfixstart: 'a' end: 'z' reverse: true
When you either
end, and the order is
it will also reverse the range,
start: X end: null //from X to end of databasestart: null end: X //from start of database to X
and you will get the some data, whether you have reverse=true|false, but only the order will change.