Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abstract-leveldown

Package Overview
Dependencies
Maintainers
3
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-leveldown - npm Package Compare versions

Comparing version 6.2.1 to 6.2.2

8

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

## [6.2.2] - 2019-10-21
### Added
- Add more range tests ([#353](https://github.com/Level/abstract-leveldown/issues/353)) ([**@vweevers**](https://github.com/vweevers))
## [6.2.1] - 2019-10-01

@@ -797,2 +803,4 @@

[6.2.2]: https://github.com/Level/abstract-leveldown/compare/v6.2.1...v6.2.2
[6.2.1]: https://github.com/Level/abstract-leveldown/compare/v6.2.0...v6.2.1

@@ -799,0 +807,0 @@

15

CONTRIBUTORS.md

@@ -5,5 +5,5 @@ # Contributors

| :------------------------- | :----------------------------------------------------- | :----------------------------------------------------------------------- |
| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) |
| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) |
| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) |
| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) |
| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) |

@@ -18,13 +18,10 @@ | **David Björklund** | [**@kesla**](https://github.com/kesla) | [**@david_bjorklund@twitter**](https://twitter.com/david_bjorklund) |

| **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) |
| **Andrew Kelley** | [**@andrewrk**](https://github.com/andrewrk) | |
| **Tapani Moilanen** | [**@Tapppi**](https://github.com/Tapppi) | |
| **Mathias Buus** | [**@mafintosh**](https://github.com/mafintosh) | [**@mafintosh@twitter**](https://twitter.com/mafintosh) |
| **Andrew Kelley** | [**@andrewrk**](https://github.com/andrewrk) | |
| **Huan LI** | [**@zixia**](https://github.com/zixia) | [**@zixia@twitter**](https://twitter.com/zixia) |
| **Dominic Tarr** | [**@dominictarr**](https://github.com/dominictarr) | [**@dominictarr@twitter**](https://twitter.com/dominictarr) |
| **Hao-kang Den** | | |
| **Kyle Robinson Young** | [**@shama**](https://github.com/shama) | [**@shamakry@twitter**](https://twitter.com/shamakry) |
| **Nathan Shively-Sanders** | [**@sandersn**](https://github.com/sandersn) | |
| **Nolan Lawson** | [**@nolanlawson**](https://github.com/nolanlawson) | [**@nolan@toot.cafe**](https://toot.cafe/@nolan) |
| **Tim Kuijsten** | [**@timkuijsten**](https://github.com/timkuijsten) | [**@timkuijsten@mastodon.social**](https://mastodon.social/@timkuijsten) |
| **Raynos (Jake Verbaten)** | | |
| **Nathan Shively-Sanders** | [**@sandersn**](https://github.com/sandersn) | |
| **Kyle Robinson Young** | [**@shama**](https://github.com/shama) | [**@shamakry@twitter**](https://twitter.com/shamakry) |
| **Tim Oxley** | [**@timoxley**](https://github.com/timoxley) | [**@secoif@twitter**](https://twitter.com/secoif) |
| **Dominic Tarr** | [**@dominictarr**](https://github.com/dominictarr) | [**@dominictarr@twitter**](https://twitter.com/dominictarr) |
| **Hao-kang Den** | | |

2

package.json
{
"name": "abstract-leveldown",
"version": "6.2.1",
"version": "6.2.2",
"description": "An abstract prototype matching the LevelDOWN API",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -8,3 +8,3 @@ # abstract-leveldown

[![Node version](https://img.shields.io/node/v/abstract-leveldown.svg)](https://www.npmjs.com/package/abstract-leveldown)
[![Travis](https://img.shields.io/travis/Level/abstract-leveldown.svg?logo=travis&label=)](https://travis-ci.org/Level/abstract-leveldown)
[![Travis](https://img.shields.io/travis/com/Level/abstract-leveldown.svg?logo=travis&label=)](https://travis-ci.com/Level/abstract-leveldown)
[![Coverage Status](https://coveralls.io/repos/github/Level/abstract-leveldown/badge.svg)](https://coveralls.io/github/Level/abstract-leveldown)

@@ -11,0 +11,0 @@ [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

var collectEntries = require('level-concat-iterator')
var xtend = require('xtend')

@@ -47,2 +48,26 @@ var db

})
// Test the documented promise that in reverse mode,
// "the returned entries are the same, but in reverse".
if (!opts.reverse && !('limit' in opts)) {
var reverseOpts = xtend(opts, { reverse: true })
// Swap start & end options
if (('start' in opts) && ('end' in opts)) {
reverseOpts.end = opts.start
reverseOpts.start = opts.end
} else if ('start' in opts) {
reverseOpts.end = opts.start
delete reverseOpts.start
} else if ('end' in opts) {
reverseOpts.start = opts.end
delete reverseOpts.end
}
rangeTest(
name + ' (flipped)',
reverseOpts,
expected.slice().reverse()
)
}
}

@@ -296,2 +321,34 @@

rangeTest('test iterator with lt after database end', {
lt: 'a'
}, data.slice())
rangeTest('test iterator with end after database end - legacy', {
end: 'a'
}, data.slice())
rangeTest('test iterator with lt at database end', {
lt: data[data.length - 1].key
}, data.slice(0, -1))
rangeTest('test iterator with lte at database end', {
lte: data[data.length - 1].key
}, data.slice())
rangeTest('test iterator with end at database end - legacy', {
end: data[data.length - 1].key
}, data.slice())
rangeTest('test iterator with lt before database end', {
lt: data[data.length - 2].key
}, data.slice(0, -2))
rangeTest('test iterator with lte before database end', {
lte: data[data.length - 2].key
}, data.slice(0, -1))
rangeTest('test iterator with end before database end - legacy', {
end: data[data.length - 2].key
}, data.slice(0, -1))
rangeTest('test iterator with lte and gte after database and reverse=true', {

@@ -298,0 +355,0 @@ lte: '9b',

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc