Comparing version 0.3.1 to 0.3.2
@@ -150,4 +150,4 @@ /* Copyright (c) 2012 Rod Vagg <@rvagg> */ | ||
, put: function (key, value, options_, callback_) { | ||
var callback, options, err | ||
, put: function (key_, value_, options_, callback_) { | ||
var callback, options, err, key, value | ||
@@ -157,3 +157,3 @@ if (!this.isOpen() && !this.isClosed()) { | ||
return this.once('ready', function () { | ||
this.put(key, value, options_, callback_) | ||
this.put(key_, value_, options_, callback_) | ||
}) | ||
@@ -166,4 +166,4 @@ } | ||
options = getOptions(options_, this._options) | ||
key = toBuffer(key, options.keyEncoding || options.encoding) | ||
value = toBuffer(value, options.valueEncoding || options.encoding) | ||
key = toBuffer(key_, options.keyEncoding || options.encoding) | ||
value = toBuffer(value_, options.valueEncoding || options.encoding) | ||
this._db.put(key, value, options, function (err) { | ||
@@ -176,3 +176,3 @@ if (err) { | ||
} else { | ||
this.emit('put', key, value) | ||
this.emit('put', key_, value_) | ||
// Node 0.9 bug, do this in current tick and a copy() operation will core dump | ||
@@ -190,4 +190,4 @@ callback && process.nextTick(callback.bind(null, null, key, value)) | ||
, del: function (key, options_, callback_) { | ||
var callback, options, err | ||
, del: function (key_, options_, callback_) { | ||
var callback, options, err, key | ||
@@ -197,3 +197,3 @@ if (!this.isOpen() && !this.isClosed()) { | ||
return this.once('ready', function () { | ||
this.del(key, options_, callback_) | ||
this.del(key_, options_, callback_) | ||
}) | ||
@@ -206,3 +206,3 @@ } | ||
options = getOptions(options_, this._options) | ||
key = toBuffer(key, options.keyEncoding || options.encoding) | ||
key = toBuffer(key_, options.keyEncoding || options.encoding) | ||
this._db.del(key, options, function (err) { | ||
@@ -215,3 +215,3 @@ if (err) { | ||
} else { | ||
this.emit('del', key) | ||
this.emit('del', key_) | ||
callback && callback(null, key) | ||
@@ -228,8 +228,8 @@ } | ||
, batch: function (arr, options_, callback_) { | ||
var callback, options, keyEncoding, valueEncoding, err | ||
, batch: function (arr_, options_, callback_) { | ||
var callback, options, keyEncoding, valueEncoding, err, arr | ||
if (!this.isOpen() && !this.isClosed()) { | ||
return this.once('ready', function () { | ||
this.batch(arr, options_, callback_) | ||
this.batch(arr_, options_, callback_) | ||
}) | ||
@@ -250,3 +250,3 @@ } | ||
valueEncoding = options.valueEncoding || options.encoding | ||
arr = arr.map(function (e) { | ||
arr = arr_.map(function (e) { | ||
if (e.type !== undefined && e.key !== undefined) { | ||
@@ -270,4 +270,4 @@ var o = { | ||
} else { | ||
this.emit('batch', arr) | ||
callback && callback() | ||
this.emit('batch', arr_) | ||
callback && callback(null, arr) | ||
} | ||
@@ -274,0 +274,0 @@ }.bind(this)) |
{ | ||
"name": "levelup", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "errno": { |
{ | ||
"name" : "levelup" | ||
, "description" : "Fast & simple storage - a Node.js-style LevelDB wrapper" | ||
, "authors": [ | ||
"Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)" | ||
] | ||
, "keywords" : [ | ||
"leveldb" | ||
, "levelup" | ||
, "stream" | ||
, "database" | ||
, "db" | ||
, "database" | ||
, "store" | ||
, "storage" | ||
, "json" | ||
] | ||
, "version" : "0.3.1" | ||
, "main" : "lib/levelup.js" | ||
, "dependencies" : { | ||
"errno" : "~0.0.3" | ||
, "bindings" : "~1.0.0" | ||
, "concat-stream" : "~0.0.9" | ||
, "bufferstream" : "~0.5.1" | ||
} | ||
, "devDependencies" : { | ||
"buster" : "*" | ||
, "rimraf" : "*" | ||
, "async" : "*" | ||
, "fstream" : "*" | ||
, "tar" : "*" | ||
, "mkfiletree" : "*" | ||
, "readfiletree" : "*" | ||
, "slow-stream" : "*" | ||
, "delayed" : "*" | ||
, "boganipsum" : "*" | ||
} | ||
, "repository": { | ||
"type": "git" | ||
, "url": "https://github.com/rvagg/node-levelup.git" | ||
} | ||
, "scripts" : { | ||
"test" : "./node_modules/.bin/buster-test" | ||
, "install" : "node-gyp rebuild" | ||
, "functionaltest" : "node ./test/functional/fstream-test.js" | ||
} | ||
, "license" : "MIT" | ||
, "gypfile" : true | ||
"name": "levelup", | ||
"description": "Fast & simple storage - a Node.js-style LevelDB wrapper", | ||
"authors": [ | ||
"Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)" | ||
], | ||
"keywords": [ | ||
"leveldb", | ||
"levelup", | ||
"stream", | ||
"database", | ||
"db", | ||
"database", | ||
"store", | ||
"storage", | ||
"json" | ||
], | ||
"version": "0.3.2", | ||
"main": "lib/levelup.js", | ||
"dependencies": { | ||
"errno": "~0.0.3", | ||
"bindings": "~1.0.0", | ||
"concat-stream": "~0.0.9", | ||
"bufferstream": "~0.5.1" | ||
}, | ||
"devDependencies": { | ||
"buster": "*", | ||
"rimraf": "*", | ||
"async": "*", | ||
"fstream": "*", | ||
"tar": "*", | ||
"mkfiletree": "*", | ||
"readfiletree": "*", | ||
"slow-stream": "*", | ||
"delayed": "*", | ||
"boganipsum": "*" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rvagg/node-levelup.git" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/.bin/buster-test", | ||
"install": "node-gyp rebuild", | ||
"functionaltests": "node ./test/functional/fstream-test.js && node ./test/functional/binary-data-test.js && node ./test/functional/compat-test.js", | ||
"alltests": "npm test && npm run-script functionaltests", | ||
"publish": "rm -rf ./node_modules/ npm-shrinkwrap.json && npm install --production && npm shrinkwrap && npm publish && rm npm-shrinkwrap.json && npm install" | ||
}, | ||
"license": "MIT", | ||
"gypfile": true | ||
} |
@@ -76,2 +76,5 @@ var assert = require('buster').assert | ||
console.log('***************************************************') | ||
console.log('RUNNING FSTREAM-TEST...') | ||
async.waterfall([ | ||
@@ -92,2 +95,5 @@ rimraf.bind(null, dblocation) | ||
, cleanUp | ||
, function () { | ||
console.log('***************************************************') | ||
} | ||
]) |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9492
5
3314840
273
9