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

jsft-mongodb

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsft-mongodb - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

11

lib/Collection.js

@@ -168,2 +168,3 @@ 'use strict';

var collection = _Link2.default.getCollection(collectionName);
var conditions = { _id: (0, _mongodb.ObjectId)(props.id) };

@@ -174,4 +175,4 @@ var updates = {

return _Link2.default.getCollection(collectionName).update(conditions, updates).then(function () {
return _Link2.default.getCollection(collectionName).findOne(conditions);
return collection.update(conditions, updates).then(function () {
return collection.findOne(conditions);
}).then(function (doc) {

@@ -193,6 +194,8 @@ return doc ? fromDocument(doc) : undefined;

var collection = _Link2.default.getCollection(collectionName);
var conditions = { _id: (0, _mongodb.ObjectId)(props.id) };
var collection = _Link2.default.getCollection(collectionName);
return collection.update(conditions, toDocument(props)).then(collection.findOne(conditions)).then(function (doc) {
return collection.update(conditions, toDocument(props)).then(function () {
return collection.findOne(conditions);
}).then(function (doc) {
return doc ? fromDocument(doc) : undefined;

@@ -199,0 +202,0 @@ });

@@ -35,3 +35,8 @@ 'use strict';

db = db || (0, _monk2.default)(dbUrl);
db = db || (0, _monk2.default)(dbUrl, {}, function (err) {
if (err) {
throw err;
}
});
collections[name] = collections.name || db.get(name);

@@ -38,0 +43,0 @@

{
"name": "jsft-mongodb",
"version": "0.1.1",
"version": "0.1.2",
"description": "Functional abstraction layer for mongodb-storage of objects with structures defined with json-schema",

@@ -32,3 +32,3 @@ "main": "lib/index.js",

"mongodb": "^2.2.22",
"monk": "^3.1.4"
"monk": "^4.0.0"
},

@@ -35,0 +35,0 @@ "devDependencies": {

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