Comparing version 0.1.1 to 0.1.2
@@ -37,5 +37,5 @@ /* Copyright (c) 2012 Rod Vagg <@rvagg> */ | ||
this._options = extend(extend({}, defaultOptions), options) | ||
if (this._options.start) | ||
if (typeof this._options.start !== 'undefined') | ||
this._options.start = toBuffer(this._options.start) | ||
if (this._options.end) | ||
if (typeof this._options.end !== 'undefined') | ||
this._options.end = toBuffer(this._options.end) | ||
@@ -42,0 +42,0 @@ |
@@ -18,3 +18,3 @@ { | ||
] | ||
, "version" : "0.1.1" | ||
, "version" : "0.1.2" | ||
, "main" : "lib/levelup.js" | ||
@@ -21,0 +21,0 @@ , "dependencies" : { |
@@ -458,2 +458,40 @@ /* Copyright (c) 2012 Rod Vagg <@rvagg> */ | ||
} | ||
, 'test ReadStream, start=0': function (done) { | ||
this.openTestDatabase(function (db) { | ||
// execute | ||
db.batch(this.sourceData.slice(), function (err) { | ||
refute(err) | ||
var rs = db.readStream({ start: 0 }) | ||
assert.isFalse(rs.writable) | ||
assert.isTrue(rs.readable) | ||
rs.on('ready', this.readySpy) | ||
rs.on('data' , this.dataSpy) | ||
rs.on('end' , this.endSpy) | ||
rs.on('close', this.verify.bind(this, rs, done)) | ||
}.bind(this)) | ||
}.bind(this)) | ||
} | ||
// we don't expect any data to come out of here because the keys start at '00' not 0 | ||
// we just want to ensure that we don't kill the process | ||
, 'test ReadStream, end=0': function (done) { | ||
this.openTestDatabase(function (db) { | ||
// execute | ||
db.batch(this.sourceData.slice(), function (err) { | ||
refute(err) | ||
var rs = db.readStream({ end: 0 }) | ||
assert.isFalse(rs.writable) | ||
assert.isTrue(rs.readable) | ||
rs.on('ready', this.readySpy) | ||
rs.on('data' , this.dataSpy) | ||
rs.on('end' , this.endSpy) | ||
rs.on('close', this.verify.bind(this, rs, done)) | ||
this.sourceData = [ ] | ||
}.bind(this)) | ||
}.bind(this)) | ||
} | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
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
2896470
224
2256
1