New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0 to 0.0.1

index.js

15

lib/index.js

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

exports.Types = {
ObjectID: ObjectID
};
var config = {

@@ -15,2 +19,3 @@ db: null

function exports (o) {
this._id = this._id || new ObjectID();
for(var i in o) {

@@ -21,3 +26,2 @@ if (Object.hasOwnProperty.call(o, i)) {

}
this._id = this._id || new ObjectID();
}

@@ -59,2 +63,11 @@

exports.findById = function (_id, callback) {
return this.findOne({_id: new ObjectID(_id)}, callback);
};
exports.findAndModify = function (query, sort, update, options, callback) {
var collection = GC(this);
return collection.findAndModify.apply(collection, arguments);
};
exports.init = function (target, collection) {

@@ -61,0 +74,0 @@ util.inherits(target, exports);

6

package.json
{
"name": "mong",
"version": "0.0.0",
"version": "0.0.1",
"description": "Lightweight models for mongodb objects",
"main": "lib/index",
"scripts": {
"test": "mocha --recursive"
"test": "[[ -z $TRAVIS_JOB_ID ]] && mocha --recursive || npm run travis",
"travis": "jscoverage lib lib-cov && MONG_COVERAGE=1 mocha --recursive -R mocha-lcov-reporter | coveralls && mocha --recursive",
"coverage": "jscoverage lib lib-cov && MONG_COVERAGE=1 mocha --recursive -R html-cov > lib-cov/test.html && open lib-cov/test.html"
},

@@ -9,0 +11,0 @@ "repository": {

@@ -42,2 +42,5 @@ mongomodel

```
```
[![Build Status](https://travis-ci.org/aantthony/mong.png?branch=master)](https://travis-ci.org/aantthony/mong) [![Coverage Status](https://coveralls.io/repos/aantthony/mong/badge.png?branch=master)](https://coveralls.io/r/aantthony/mong?branch=master)

@@ -1,2 +0,2 @@

var lib = require('../../lib');
var lib = require('../../index');
var should = require('should');

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

var lib = require('../../lib');
var lib = require('../../index');
var should = require('should');

@@ -3,0 +3,0 @@ var sinon = require('sinon');

@@ -1,2 +0,2 @@

var lib = require('../../lib');
var lib = require('../../index');
var should = require('should');

@@ -3,0 +3,0 @@

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