abstract-leveldown
Advanced tools
Comparing version 2.6.1 to 2.6.2
@@ -1,2 +0,2 @@ | ||
/* Copyright (c) 2013 Rod Vagg, MIT License */ | ||
/* Copyright (c) 2017 Rod Vagg, MIT License */ | ||
@@ -3,0 +3,0 @@ function AbstractChainedBatch (db) { |
@@ -1,2 +0,2 @@ | ||
/* Copyright (c) 2013 Rod Vagg, MIT License */ | ||
/* Copyright (c) 2017 Rod Vagg, MIT License */ | ||
@@ -3,0 +3,0 @@ function AbstractIterator (db) { |
@@ -1,2 +0,2 @@ | ||
/* Copyright (c) 2013 Rod Vagg, MIT License */ | ||
/* Copyright (c) 2017 Rod Vagg, MIT License */ | ||
@@ -3,0 +3,0 @@ var xtend = require('xtend') |
@@ -58,4 +58,4 @@ var db | ||
db._put = function (key, value, opts, callback) { | ||
t.equal(Buffer.isBuffer(key) ? String(key) : key, '[object Object]') | ||
t.equal(Buffer.isBuffer(value) ? String(value) : value, '[object Object]') | ||
t.ok(key) | ||
t.ok(value) | ||
callback() | ||
@@ -62,0 +62,0 @@ } |
The MIT License (MIT) | ||
===================== | ||
Copyright (c) 2014 Rod Vagg | ||
Copyright (c) 2013-2017 Rod Vagg | ||
--------------------------- | ||
@@ -6,0 +6,0 @@ |
{ | ||
"name": "abstract-leveldown", | ||
"description": "An abstract prototype matching the LevelDOWN API", | ||
"version": "2.6.1", | ||
"version": "2.6.2", | ||
"contributors": [ | ||
@@ -36,5 +36,5 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)", | ||
"devDependencies": { | ||
"rimraf": "~2.5.0", | ||
"sinon": "~1.17.2", | ||
"tape": "~4.5.0" | ||
"rimraf": "^2.6.1", | ||
"sinon": "^2.4.1", | ||
"tape": "^4.7.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "browser": { |
@@ -150,4 +150,4 @@ # Abstract LevelDOWN | ||
Copyright © 2012-2015 **AbstractLevelDOWN** [contributors](https://github.com/level/community#contributors). | ||
Copyright © 2013-2017 **AbstractLevelDOWN** [contributors](https://github.com/level/community#contributors). | ||
**AbstractLevelDOWN** 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. |
33
test.js
@@ -571,2 +571,34 @@ var test = require('tape') | ||
test('test serialization extensibility', function (t) { | ||
var spy = sinon.spy() | ||
, test | ||
function Test (location) { | ||
AbstractLevelDOWN.call(this, location) | ||
} | ||
util.inherits(Test, AbstractLevelDOWN) | ||
Test.prototype._serializeKey = function (key) { | ||
t.equal(key, 'no') | ||
return 'foo' | ||
} | ||
Test.prototype._serializeValue = function (value) { | ||
t.equal(value, 'nope') | ||
return 'bar' | ||
} | ||
Test.prototype._put = spy | ||
test = new Test('foobar') | ||
test.put('no', 'nope', function () {}) | ||
t.equal(spy.callCount, 1, 'got _put() call') | ||
t.equal(spy.getCall(0).args[0], 'foo', 'got expected key argument') | ||
t.equal(spy.getCall(0).args[1], 'bar', 'got expected value argument') | ||
t.end() | ||
}) | ||
test('isLevelDOWN', function (t) { | ||
@@ -716,2 +748,1 @@ t.notOk(isLevelDOWN(), 'is not a leveldown') | ||
}) | ||
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
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
130598
3077