encoding-down
Advanced tools
Comparing version 5.0.0 to 5.0.1
@@ -5,2 +5,24 @@ # Changelog | ||
## [5.0.1] - 2018-05-19 | ||
### Changed | ||
* Override `_setupIteratorOptions` to not clobber ranges (@ralphtheninja, @dominictarr) | ||
## [4.0.1] - 2018-05-19 | ||
### Changed | ||
* Override `_setupIteratorOptions` to not clobber ranges (@ralphtheninja, @dominictarr) | ||
## [5.0.0] - 2018-05-13 | ||
### Added | ||
* Add 10 to Travis (@ralphtheninja) | ||
### Changed | ||
* Update `level-errors` to `2.0.0` (@ralphtheninja) | ||
* Update `level-codec` to `9.0.0` (@ralphtheninja) | ||
### Removed | ||
* Remove 4 from Travis (@ralphtheninja) | ||
## [4.0.0] - 2018-02-12 | ||
@@ -169,3 +191,6 @@ | ||
[Unreleased]: https://github.com/level/encoding-down/compare/v4.0.0...HEAD | ||
[Unreleased]: https://github.com/level/encoding-down/compare/v5.0.1...HEAD | ||
[5.0.1]: https://github.com/level/encoding-down/compare/v5.0.0...v5.0.1 | ||
[5.0.0]: https://github.com/level/encoding-down/compare/v4.0.0...v5.0.0 | ||
[4.0.1]: https://github.com/level/encoding-down/compare/v4.0.0...v4.0.1 | ||
[4.0.0]: https://github.com/level/encoding-down/compare/v3.0.1...v4.0.0 | ||
@@ -172,0 +197,0 @@ [3.0.1]: https://github.com/level/encoding-down/compare/v3.0.0...v3.0.1 |
12
index.js
@@ -7,2 +7,3 @@ 'use strict' | ||
var inherits = require('util').inherits | ||
var xtend = require('xtend') | ||
var Codec = require('level-codec') | ||
@@ -81,2 +82,13 @@ var EncodingError = require('level-errors').EncodingError | ||
DB.prototype._setupIteratorOptions = function (options) { | ||
options = xtend(options) | ||
options.reverse = !!options.reverse | ||
options.keys = options.keys !== false | ||
options.values = options.values !== false | ||
options.limit = 'limit' in options ? options.limit : -1 | ||
options.keyAsBuffer = options.keyAsBuffer !== false | ||
options.valueAsBuffer = options.valueAsBuffer !== false | ||
return options | ||
} | ||
DB.prototype.approximateSize = function (start, end, opts, cb) { | ||
@@ -83,0 +95,0 @@ return this.db.approximateSize(start, end, opts, cb) |
{ | ||
"name": "encoding-down", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"license": "MIT", | ||
@@ -8,3 +8,2 @@ "repository": "level/encoding-down", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"scripts": { | ||
@@ -22,3 +21,4 @@ "test": "standard && node test" | ||
"level-codec": "^9.0.0", | ||
"level-errors": "^2.0.0" | ||
"level-errors": "^2.0.0", | ||
"xtend": "^4.0.1" | ||
}, | ||
@@ -25,0 +25,0 @@ "engines": { |
@@ -311,1 +311,21 @@ var test = require('tape') | ||
}) | ||
test('iterator options does not clobber ranges', function (t) { | ||
t.plan(4) | ||
var down = { | ||
iterator: function (options) { | ||
t.is(options.gt, null) | ||
t.is(options.gte, null) | ||
t.is(options.lt, null) | ||
t.is(options.lte, null) | ||
} | ||
} | ||
encdown(down).iterator({ | ||
gt: null, | ||
gte: null, | ||
lt: null, | ||
lte: null | ||
}) | ||
}) |
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
23306
411
4
6
+ Addedxtend@^4.0.1