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

bdb

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bdb - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

4

lib/db.js

@@ -532,3 +532,3 @@ /*!

value.write(name, 0, 'ascii');
value.writeUInt32LE(version, name.length, true);
value.writeUInt32LE(version, name.length);
const batch = this.batch();

@@ -546,3 +546,3 @@ batch.put(key, value);

const num = data.readUInt32LE(name.length, true);
const num = data.readUInt32LE(name.length);

@@ -549,0 +549,0 @@ if (num !== version)

@@ -71,3 +71,3 @@ /**

assertLen(o + 2 <= k.length);
return k.readUInt16BE(o, true);
return readU16BE(k, o);
},

@@ -77,3 +77,3 @@ write(k, v, o) {

assertLen(o + 2 <= k.length);
k.writeUInt16BE(v, o, true);
writeU16BE(k, v, o);
return 2;

@@ -91,3 +91,3 @@ }

assertLen(o + 4 <= k.length);
return k.readUInt32BE(o, true);
return readU32BE(k, o);
},

@@ -97,3 +97,3 @@ write(k, v, o) {

assertLen(o + 4 <= k.length);
k.writeUInt32BE(v, o, true);
writeU32BE(k, v, o);
return 4;

@@ -213,3 +213,3 @@ }

assertType(writeHex(k, v, o + 1, 'hex') === size);
assertType(writeHex(k, v, o + 1) === size);

@@ -498,2 +498,36 @@ return 1 + size;

function readU32BE(data, off) {
const first = data[off];
const last = data[off + 3];
return first * 2 ** 24 +
data[++off] * 2 ** 16 +
data[++off] * 2 ** 8 +
last;
}
function readU16BE(data, off) {
const first = data[off];
const last = data[off + 1];
return first * 2 ** 8 + last;
}
function writeU32BE(dst, num, off) {
dst[off + 3] = num;
num = num >>> 8;
dst[off + 2] = num;
num = num >>> 8;
dst[off + 1] = num;
num = num >>> 8;
dst[off] = num;
return off + 4;
}
function writeU16BE(dst, num, off) {
dst[off++] = (num >>> 8);
dst[off++] = num;
return off;
}
/*

@@ -500,0 +534,0 @@ * Expose

{
"name": "bdb",
"version": "0.1.0",
"version": "0.2.0",
"description": "Database for bcoin",

@@ -25,21 +25,22 @@ "keywords": [

"test": "mocha --reporter spec test/*-test.js",
"webpack": "webpack --config webpack.config.js"
"webpack": "webpack --mode production --config webpack.config.js"
},
"dependencies": {
"leveldown": "3.0.0"
"leveldown": "4.0.1"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
"babel-preset-env": "^1.7.0",
"babelify": "^8.0.0",
"browserify": "^16.1.1",
"eslint": "^4.18.2",
"mocha": "^5.0.4",
"browserify": "^16.2.2",
"eslint": "^4.19.1",
"mocha": "^5.2.0",
"uglify-es": "^3.3.9",
"uglifyjs-webpack-plugin": "^1.2.3",
"webpack": "^4.1.1"
"uglifyjs-webpack-plugin": "^1.2.5",
"webpack": "^4.11.1",
"webpack-cli": "^3.0.3"
},
"engines": {
"node": ">=7.6.0"
"node": ">=8.0.0"
},

@@ -46,0 +47,0 @@ "browser": {

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