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

abstract-nosql

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-nosql - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

4

abstract-nosql.js

@@ -554,4 +554,4 @@ // Generated by CoffeeScript 1.8.0

options.limit = ("limit" in options ? options.limit : -1);
options.keyAsBuffer = options.keyAsBuffer !== false;
options.valueAsBuffer = options.valueAsBuffer !== false;
options.keyAsBuffer = options.keyAsBuffer === true;
options.valueAsBuffer = options.valueAsBuffer === true;
return options;

@@ -558,0 +558,0 @@ };

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

if (key && value) {
t.equal(key, data[idx].key, 'correct key')
t.equal(value, data[idx].value, 'correct value')
process.nextTick(next)
idx++
} else { // end
t.ok(typeof err === 'undefined', 'err argument is undefined')
t.ok(typeof key === 'undefined', 'key argument is undefined')
t.ok(typeof value === 'undefined', 'value argument is undefined')
t.equal(idx, data.length, 'correct number of entries')
iterator.end(function () {
t.end()
})
}
}
, next = function () {
iterator.next(fn)
}
next()
})
})
test('test simple iterator() asBuffer', function (t) {
var data = [
{ type: 'put', key: 'foobatch1', value: 'bar1' }
, { type: 'put', key: 'foobatch2', value: 'bar2' }
, { type: 'put', key: 'foobatch3', value: 'bar3' }
]
, idx = 0
db.batch(data, function (err) {
t.error(err)
var iterator = db.iterator({keyAsBuffer: true, valueAsBuffer: true})
, fn = function (err, key, value) {
t.error(err)
if (key && value) {
t.ok(Buffer.isBuffer(key), 'key argument is a Buffer')

@@ -127,0 +163,0 @@ t.ok(Buffer.isBuffer(value), 'value argument is a Buffer')

{
"name": "abstract-nosql",
"description": "An abstract prototype for nosql database(LevelDOWN API)",
"version": "1.4.1",
"version": "1.4.2",
"contributors": [

@@ -6,0 +6,0 @@ "Riceball LEE <snowyu.lee@gmail.com> (https://github.com/snowyu)",

@@ -496,3 +496,3 @@ const tap = require('tap')

var spy = sinon.spy()
, expectedOptions = { options: 1, reverse: false, keys: true, values: true, limit: -1, keyAsBuffer: true, valueAsBuffer: true }
, expectedOptions = { options: 1, reverse: false, keys: true, values: true, limit: -1, keyAsBuffer: false, valueAsBuffer: false }
, test

@@ -499,0 +499,0 @@

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