Socket
Socket
Sign inDemoInstall

abstract-leveldown

Package Overview
Dependencies
Maintainers
1
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 0.12.3 to 0.12.4

LICENSE.md

2

abstract-leveldown.js

@@ -243,4 +243,2 @@ /* Copyright (c) 2013 Rod Vagg, MIT License */

AbstractLevelDOWN.prototype._checkKeyValue = function (obj, type) {
if (obj === null || obj === undefined)
return new Error(type + ' cannot be `null` or `undefined`')

@@ -247,0 +245,0 @@ if (obj === null || obj === undefined)

@@ -125,2 +125,4 @@ var db

if (key && value) {
t.ok(Buffer.isBuffer(key), 'key argument is a Buffer')
t.ok(Buffer.isBuffer(value), 'value argument is a Buffer')
t.equal(key.toString(), data[idx].key, 'correct key')

@@ -449,2 +451,26 @@ t.equal(value.toString(), data[idx].value, 'correct value')

module.exports.snapshot = function (leveldown, test, testCommon) {
test('setUp #3', function (t) {
db.close(function () {
db = leveldown(testCommon.location())
db.open(function () {
db.put('foobatch1', 'bar1', t.end.bind(t))
})
})
})
test('iterator create snapshot correctly', function (t) {
var iterator = db.iterator()
db.del('foobatch1', function () {
iterator.next(function (err, key, value) {
t.notOk(err, 'no error')
t.ok(key, 'got a key')
t.equal(key.toString(), 'foobatch1', 'correct key')
t.equal(value.toString(), 'bar1', 'correct value')
iterator.end(t.end.bind(t))
})
})
})
}
module.exports.tearDown = function (test, testCommon) {

@@ -461,3 +487,4 @@ test('tearDown', function (t) {

module.exports.iterator(leveldown, test, testCommon, testCommon.collectEntries)
module.exports.snapshot(leveldown, test, testCommon)
module.exports.tearDown(test, testCommon)
}

@@ -0,3 +1,5 @@

var nfre = /NotFound/i
module.exports.verifyNotFoundError = function verifyNotFoundError (err) {
return (/NotFound/i).test(err.message)
return nfre.test(err.message) || nfre.test(err.name)
}

@@ -4,0 +6,0 @@

{
"name": "abstract-leveldown",
"description": "An abstract prototype matching the LevelDOWN API",
"version": "0.12.3",
"version": "0.12.4",
"contributors": [

@@ -6,0 +6,0 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)",

# Abstract LevelDOWN [![Build Status](https://secure.travis-ci.org/rvagg/abstract-leveldown.png)](http://travis-ci.org/rvagg/abstract-leveldown)
[![NPM](https://nodei.co/npm/abstract-leveldown.png?downloads=true)](https://nodei.co/npm/abstract-leveldown/)
[![NPM](https://nodei.co/npm-dl/abstract-leveldown.png?months=6)](https://nodei.co/npm/abstract-leveldown/)
[![NPM](https://nodei.co/npm/abstract-leveldown.png?downloads=true&downloadRank=true)](https://nodei.co/npm/abstract-leveldown/)
[![NPM](https://nodei.co/npm-dl/abstract-leveldown.png?months=6&height=3)](https://nodei.co/npm/abstract-leveldown/)

@@ -153,8 +153,8 @@ An abstract prototype matching the **[LevelDOWN](https://github.com/rvagg/node-leveldown/)** API. Useful for extending **[LevelUP](https://github.com/rvagg/node-levelup)** functionality by providing a replacement to LevelDOWN.

<a name="licence"></a>
Licence &amp; copyright
<a name="license"></a>
License &amp; copyright
-------------------
Copyright (c) 2012-2013 Abstract LevelDOWN contributors (listed above).
Copyright (c) 2012-2014 Abstract LevelDOWN contributors (listed above).
Abstract LevelDOWN is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
Abstract LevelDOWN is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
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