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.6.0 to 0.6.1

9

lib/Collection.js

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

* @param {object} conditions Query conditions (mongodb query conditions)
* @param {object} [options] Query options
* @return {Promise}

@@ -167,2 +168,3 @@ */

var conditions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};

@@ -172,3 +174,3 @@ assertCollectionName(collectionName);

return _Link2.default.getCollection(collectionName).findOne(conditions).then(function (doc) {
return _Link2.default.getCollection(collectionName).findOne(conditions, options).then(function (doc) {
return doc ? fromDocument(doc) : undefined;

@@ -210,9 +212,12 @@ });

* @param {string} id Entity id
* @param {object} [options] Query options
* @return {Promise}
*/
Collection.findById = function (collectionName, schema, id) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
assertCollectionName(collectionName);
assertSchema(schema);
return _Link2.default.getCollection(collectionName).findOne({ _id: (0, _mongodb.ObjectId)(id) }).then(function (doc) {
return _Link2.default.getCollection(collectionName).findOne({ _id: (0, _mongodb.ObjectId)(id) }, options).then(function (doc) {
return doc ? fromDocument(doc) : undefined;

@@ -219,0 +224,0 @@ });

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

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

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