This repository was archived by the owner on Dec 2, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,30 +235,12 @@ function maybeError (leveldown, callback) {
235235 return false
236236}
237237
238- // TODO (refactor): use addRestOptions instead
239- function extend ( xopts , opts ) {
240- xopts . keys = opts . keys
241- xopts . values = opts . values
242- xopts . createIfMissing = opts . createIfMissing
243- xopts . errorIfExists = opts . errorIfExists
244- xopts . keyEncoding = opts . keyEncoding
245- xopts . valueEncoding = opts . valueEncoding
246- xopts . compression = opts . compression
247- xopts . db = opts . db
248- xopts . limit = opts . limit
249- xopts . keyAsBuffer = opts . keyAsBuffer
250- xopts . valueAsBuffer = opts . valueAsBuffer
251- xopts . reverse = opts . reverse
252- xopts . fillCache = opts . fillCache
253- return xopts
254- }
255-
256238function fixRange ( opts ) {
257239 return ( ! opts . reverse || ( ! opts . end && ! opts . start ) ) ? opts : { start : opts . end , end : opts . start }
258240}
259241
260242SubDown . prototype . _iterator = function ( opts ) {
261- const xopts = extend ( wrap ( fixRange ( opts ) , this . _wrap ) , opts )
243+ const xopts = addRestOptions ( wrap ( fixRange ( opts ) , this . _wrap ) , opts )
262244 return new SubIterator ( this , this . leveldown . iterator ( xopts ) , this . prefix )
263245}
264246
You can’t perform that action at this time.
0 commit comments