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

mongojs

Package Overview
Dependencies
Maintainers
2
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.3.2 to 0.4.0

8

index.js

@@ -31,2 +31,6 @@ var mongo = require('mongodb');

};
var shouldExtend = function(that, proto, name) {
if (name[0] === '_') return false;
return !that[name] && !proto.__lookupGetter__(name) && typeof proto[name] === 'function';
};

@@ -150,3 +154,3 @@ // basicly just a proxy prototype

Object.keys(mongo.Collection.prototype).forEach(function(name) { // we just wanna proxy any remaining methods on collections
if (!Collection.prototype[name] && typeof mongo.Collection.prototype[name] === 'function') {
if (shouldExtend(Collection.prototype, mongo.Collection.prototype, name)) {
Collection.prototype[name] = function() {

@@ -220,3 +224,3 @@ this._exec(name, arguments);

Object.keys(mongo.Db.prototype).forEach(function(name) {
if (!that[name] && typeof mongo.Db.prototype[name] === 'function') {
if (shouldExtend(that, mongo.Db.prototype, name)) {
that[name] = function() {

@@ -223,0 +227,0 @@ var args = arguments;

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

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

@@ -14,3 +14,3 @@ "author": "Ge.tt <hello@ge.tt>",

"main":"./index.js",
"dependencies": {"common":">=0.1.0", "mongodb":">=0.9.6"}
"dependencies": {"common":">=0.1.0", "mongodb":"1.x.x"}
}
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