level-sublevel
Advanced tools
Comparing version 4.6.2 to 4.6.3
@@ -54,3 +54,2 @@ var EventEmitter = require('events').EventEmitter | ||
else opts.end = opts.end || sep | ||
return fun.call(db, opts) | ||
@@ -57,0 +56,0 @@ } |
{ | ||
"name": "level-sublevel", | ||
"description": "", | ||
"version": "4.6.2", | ||
"version": "4.6.3", | ||
"homepage": "https://github.com/dominictarr/level-sublevel", | ||
@@ -16,6 +16,7 @@ "repository": { | ||
"devDependencies": { | ||
"levelup": "~0.7.0", | ||
"levelup": "~0.8.0", | ||
"rimraf": "~2.1.4", | ||
"tape": "~0.2.2", | ||
"shasum": "0.0.2" | ||
"shasum": "0.0.2", | ||
"monotonic-timestamp": "0.0.8" | ||
}, | ||
@@ -22,0 +23,0 @@ "scripts": { |
@@ -99,5 +99,6 @@ var EventEmitter = require('events').EventEmitter | ||
//opts.end = p + (opts.end || this._sep) | ||
opts = ranges.prefix(opts, p) | ||
return r.createReadStream(opts) | ||
var _opts = ranges.prefix(opts, p) | ||
_opts.reverse = opts.reverse | ||
return r.createReadStream(_opts) | ||
.on('data', function (d) { | ||
@@ -104,0 +105,0 @@ //mutate the prefix! |
@@ -18,3 +18,3 @@ var test = require('tape') | ||
t.plan(10) | ||
t.plan(19) | ||
@@ -29,2 +29,7 @@ var docs = { | ||
function order(a, b) { | ||
t.deepEqual(a, b) | ||
t.equal(JSON.stringify(a), JSON.stringify(b)) | ||
} | ||
db.batch(Object.keys(docs).map(function (key) { | ||
@@ -37,7 +42,7 @@ console.log(key, docs[key]) | ||
all(db, {}, function (err, all) { | ||
t.deepEqual(all, docs) | ||
order(all, docs) | ||
}) | ||
all(db, {min: 'a~'}, function (err, all) { | ||
t.deepEqual(all, { | ||
order(all, { | ||
b: 'banana', | ||
@@ -51,3 +56,3 @@ c: 'cherry', | ||
all(db, {min: 'b'}, function (err, all) { | ||
t.deepEqual(all, { | ||
order(all, { | ||
b: 'banana', | ||
@@ -62,7 +67,7 @@ c: 'cherry', | ||
all(db, {min: 'a~', reverse: true}, function (err, all) { | ||
t.deepEqual(all, { | ||
b: 'banana', | ||
order(all, { | ||
e: 'elder-berry', | ||
d: 'durian', | ||
c: 'cherry', | ||
d: 'durian', | ||
e: 'elder-berry' | ||
b: 'banana' | ||
}) | ||
@@ -73,5 +78,5 @@ }) | ||
console.log(all) | ||
t.deepEqual(all, { | ||
d: 'durian', | ||
e: 'elder-berry' | ||
order(all, { | ||
e: 'elder-berry', | ||
d: 'durian' | ||
}) | ||
@@ -82,3 +87,3 @@ }) | ||
console.log(all) | ||
t.deepEqual(all, { | ||
order(all, { | ||
d: 'durian', | ||
@@ -89,3 +94,3 @@ }) | ||
all(db, {min: 'a~'}, function (err, all) { | ||
t.deepEqual(all, { | ||
order(all, { | ||
b: 'banana', | ||
@@ -99,4 +104,4 @@ c: 'cherry', | ||
all(db, {min: 'c~'}, function (err, all) { | ||
console.log(all) | ||
t.deepEqual(all, { | ||
console.log('d, e', all) | ||
order(all, { | ||
d: 'durian', | ||
@@ -109,3 +114,3 @@ e: 'elder-berry' | ||
console.log(all) | ||
t.deepEqual(all, { | ||
order(all, { | ||
d: 'durian', | ||
@@ -112,0 +117,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26241
18
795
5