Huge News!Announcing our $40M Series B led by Abstract Ventures.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.0.42 to 1.0.43

6

node/bin/cli.js

@@ -63,5 +63,5 @@ #!/usr/bin/env node

{value : "(cname, [copts]) Creates new collection if it does't exists"});
Object.defineProperty(EJDB.prototype.removeCollection, "_help_",
{value : "(cname, [prune], [cb]) Removes collection, " +
"if `prune` is true collection db will be erased from disk."});
Object.defineProperty(EJDB.prototype.dropCollection, "_help_",
{value : "(cname, [prune], [cb]) Drop collection, " +
"if `prune` is true collection db files will be erased from disk."});
Object.defineProperty(EJDB.prototype.save, "_help_",

@@ -68,0 +68,0 @@ {value : "(cname, object|array of object, [opts], [cb]) " +

@@ -108,9 +108,18 @@ var ejdblib;

/**
* Remove collection.
* Please use #dropCollection
* @deprecated Will be removed in v1.1 //todo
*/
EJDB.prototype.removeCollection = function(cname, prune, cb) {
this.dropCollection.apply(this, arguments);
};
/**
* Drop collection.
*
* Call variations:
* - removeCollection(cname)
* - removeCollection(cname, cb)
* - removeCollection(cname, prune, cb)
* - dropCollection(cname)
* - dropCollection(cname, cb)
* - dropCollection(cname, prune, cb)
*

@@ -121,3 +130,3 @@ * @param {String} cname Name of collection.

*/
EJDB.prototype.removeCollection = function(cname, prune, cb) {
EJDB.prototype.dropCollection = function(cname, prune, cb) {
if (arguments.length == 2) {

@@ -131,6 +140,6 @@ cb = prune;

}
//noinspection JSDeprecatedSymbols
return this._impl.removeCollection(cname, !!prune, cb);
};
/**

@@ -137,0 +146,0 @@ * Save/update specified JSON objects in the collection.

@@ -30,3 +30,3 @@ var fs = require("fs");

jb.removeCollection("c1", true, function(err) {
jb.dropCollection("c1", true, function(err) {
test.ifError(err);

@@ -39,3 +39,3 @@ test.ok(!fs.existsSync("var/tdbt12_c1"));

try {
jb.removeCollection("c1", true);
jb.dropCollection("c1", true);
} catch (e) {

@@ -42,0 +42,0 @@ err = e;

@@ -370,3 +370,3 @@ var fs = require("fs");

module.exports.testRemoveColls = function(test) {
jb.removeCollection("birds", function(err) {
jb.dropCollection("birds", function(err) {
test.ifError(err);

@@ -373,0 +373,0 @@ jb.find("birds", {}, function(err, cursor, count) { //Query on not existing collection

{
"name" : "ejdb",
"version" : "1.0.42",
"version" : "1.0.43",
"main" : "node/ejdb.js",

@@ -5,0 +5,0 @@ "homepage" : "http://ejdb.org",

@@ -183,12 +183,12 @@ ![EJDB](https://raw.github.com/Softmotions/ejdb/master/misc/ejdblogo3.png)

<a name="removeCollection"/>
### removeCollection(cname, prune, cb)
<a name="dropCollection"/>
### dropCollection(cname, prune, cb)
Remove collection.
Drop collection.
Call variations:
removeCollection(cname)
removeCollection(cname, cb)
removeCollection(cname, prune, cb)
dropCollection(cname)
dropCollection(cname, cb)
dropCollection(cname, prune, cb)

@@ -195,0 +195,0 @@ __Arguments__

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