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

mong

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mong - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

24

lib/index.js

@@ -26,2 +26,6 @@ var util = require('util');

var _whenReady = [];
function whenReady(fn) {
_whenReady.push(fn);
}
exports.connect = function (uri, done) {

@@ -36,2 +40,5 @@ var options = {

config.db = db;
_whenReady.forEach(function (fn) {
fn(db);
});
done(err);

@@ -41,2 +48,3 @@ });

exports.find = function () {

@@ -72,2 +80,12 @@ var collection = GC(this);

exports.ensureIndex = function (index) {
var self = this;
whenReady(function (db) {
var collection = GC(self);
collection.ensureIndex(index, function (err) {
if (err) throw err;
});
});
};
exports.init = function (target, collection) {

@@ -89,3 +107,7 @@ util.inherits(target, exports);

var collection = GC(this.constructor);
collection.save(this, done);
var self = this;
collection.save(this, function (err, numAffected, details) {
if (err) return done(err);
done(null, self);
});
};

@@ -92,0 +114,0 @@

2

package.json
{
"name": "mong",
"version": "0.0.1",
"version": "0.0.2",
"description": "Lightweight models for mongodb objects",

@@ -5,0 +5,0 @@ "main": "lib/index",

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