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

mongojs

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongojs - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

44

index.js

@@ -145,23 +145,2 @@ var mongo = require('mongodb');

};
Collection.prototype.count = function() {
this._exec('count', arguments);
};
Collection.prototype.remove = function() {
this._exec('remove', arguments);
};
Collection.prototype.update = function() {
this._exec('update', arguments);
};
Collection.prototype.rename = function() {
this._exec('rename', arguments);
};
Collection.prototype.save = function() {
this._exec('save', arguments);
};
Collection.prototype.insert = function() {
this._exec('insert', arguments);
};
Collection.prototype.insertAll = function() {
this._exec('insertAll', arguments);
};
Collection.prototype.findAndModify = function(options, callback) {

@@ -191,2 +170,10 @@ this._exec('findAndModify', [options.query, options.sort || [], options.update || {}, {

Object.keys(mongo.Collection.prototype).forEach(function(name) {
if (!Collection.prototype[name] && typeof mongo.Collection.prototype[name] === 'function') {
Collection.prototype[name] = function() {
this._exec(name, arguments);
};
}
});
exports.connect = function(url, collections) {

@@ -255,2 +242,15 @@ url = parse(url);

};
Object.keys(mongo.Db.prototype).forEach(function(name) {
if (!that[name] && typeof mongo.Db.prototype[name] === 'function') {
that[name] = function() {
var args = arguments;
var callback = args[args.length-1];
ondb.get(common.fork(callback, function(db) {
db[name].apply(db, args);
}));
};
}
});

@@ -274,2 +274,2 @@ if (collections) {

return that;
};
};

@@ -5,3 +5,3 @@ {

"keywords": ["mongo", "db", "mongodb"],
"version":"0.1.8",
"version":"0.1.9",
"homepage" : "https://github.com/gett/mongojs",

@@ -8,0 +8,0 @@ "author": "Ge.tt <hello@ge.tt>",

@@ -5,3 +5,3 @@ # mongojs

npm install mongojs
npm install mongojs --mongodb:native

@@ -8,0 +8,0 @@ mongojs is very simple to use:

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