New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ejdb

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ejdb - npm Package Compare versions

Comparing version 1.1.25 to 1.1.26-1

6

bin/cli.js

@@ -56,9 +56,9 @@ #!/usr/bin/env node

Object.defineProperty(EJDB.open, "_help_",
{value : "(dbFile, [openMode]) Open database"});
{value : "(dbFile, [openMode], [cb]) Open database"});
Object.defineProperty(EJDB.prototype.close, "_help_",
{value : "Close database"});
{value : "([cb]) Close database"});
Object.defineProperty(EJDB.prototype.isOpen, "_help_",
{value : "Check if database in opened state"});
Object.defineProperty(EJDB.prototype.ensureCollection, "_help_",
{value : "(cname, [copts]) Creates new collection if it does't exists"});
{value : "(cname, [copts], [cb]) Creates new collection if it does't exists"});
Object.defineProperty(EJDB.prototype.dropCollection, "_help_",

@@ -65,0 +65,0 @@ {value : "(cname, [prune], [cb]) Drop collection, " +

@@ -27,5 +27,5 @@ /**************************************************************************************************

const DEFAULT_OPEN_MODE = (ejdblib.JBOWRITER | ejdblib.JBOCREAT);
var EJDB = function(dbFile, openMode) {
var EJDB = function() {
Object.defineProperty(this, "_impl", {
value : new EJDBImpl(dbFile, (openMode > 0) ? openMode : DEFAULT_OPEN_MODE),
value : new EJDBImpl(),
configurable : false,

@@ -51,3 +51,4 @@ enumerable : false,

*
* This is blocking function.
* Depending on if cb parameter is passed this function is either async or
* blocking.
*

@@ -60,7 +61,18 @@ * @param {String} dbFile Database main file name

* - `JBOTRUNC` Truncate db.
* @param {Function} [cb] Callback called with error and EJDB object arguments.
* @returns {EJDB} EJDB database wrapper
*/
EJDB.open = function(dbFile, openMode) {
return new EJDB(dbFile, openMode);
EJDB.open = function(dbFile, openMode, cb) {
var db = new EJDB();
var mode = (openMode > 0) ? openMode : DEFAULT_OPEN_MODE;
if (cb) {
db._impl.open(dbFile, mode, function (err) {
cb(err, db);
});
return;
}
db._impl.open(dbFile, mode);
return db;
};

@@ -90,6 +102,9 @@

*
* This is blocking function.
* Depending on if cb parameter is passed this function is either async or
* blocking.
*
* @param {Function} [cb] Callback called with error argument.
*/
EJDB.prototype.close = function() {
return this._impl.close();
EJDB.prototype.close = function(cb) {
return this._impl.close(cb);
};

@@ -118,10 +133,16 @@

*
* This is blocking function.
* Depending on if cb parameter is passed this function is either async or
* blocking.
*
* @param {String} cname Name of collection.
* @param {Object} [copts] Collection options.
* @param {Function} [cb] Callback called with error argument.
* @return {*}
*/
EJDB.prototype.ensureCollection = function(cname, copts) {
return this._impl.ensureCollection(cname, copts || {});
EJDB.prototype.ensureCollection = function(cname, copts, cb) {
if (arguments.length === 2 && typeof copts === 'function') {
cb = copts;
copts = {};
}
return this._impl.ensureCollection(cname, copts || {}, cb);
};

@@ -128,0 +149,0 @@

[![EJDB](https://raw.github.com/Softmotions/ejdb-pub/master/misc/ejdblogo3.png)](http://ejdb.org)
NOTE
===================================
Despite a long pause in the project activity the team came back. We are working on the next version of EJDB engine (EJDB2). We will make some maintenance tasks related to the current version of EJDB but no more big changes in the stable codebase.
Embedded JSON Database engine

@@ -5,0 +10,0 @@ ====================================

{
"name" : "ejdb",
"version" : "1.1.25",
"version" : "1.1.26-1",
"config" : {
"windownloadurl_ia32" : "http://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.25-mingw32-i686.zip",
"windownloadurl_x64" : "http://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.25-mingw32-x86_64.zip"
"windownloadurl_ia32" : "https://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.26-mingw32-i686.zip",
"windownloadurl_x64" : "https://dl.dropboxusercontent.com/u/4709222/ejdb/tcejdb-1.1.26-mingw32-x86_64.zip"
},

@@ -8,0 +8,0 @@ "main" : "ejdb.js",

@@ -10,2 +10,4 @@ var cmd = process.argv[2];

var make = process.env.MAKE || "make";
if (process.platform === "win32") {

@@ -39,4 +41,4 @@ win();

console.log("Building EJDB...");
var m = spawn("make", ["-C", "ejdb"], {"stdio" : "inherit"});
m.on("close", exithandler("make all", function() {
var m = spawn(make, ["-C", "ejdb"], {"stdio" : "inherit"});
m.on("close", exithandler(make + " all", function() {
var ng = spawn("node-gyp", ["rebuild"], {stdio : "inherit"});

@@ -50,4 +52,4 @@ ng.on("close", exithandler("node-gyp"));

console.log("Tesing Node EJDB...");
var m = spawn("make", ["-f", "tests.mk", "check"], {stdio : "inherit"});
m.on("close", exithandler("make"));
var m = spawn(make, ["-f", "tests.mk", "check"], {stdio : "inherit"});
m.on("close", exithandler(make));
}

@@ -54,0 +56,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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