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

viewmodel

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

viewmodel - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

21

lib/databases/mongodb.js

@@ -181,2 +181,22 @@ var mongo = require('mongodb')

// __ensureIndexes:__ this function is used to create indexes defined in repo.
//
// `repo.ensureIndexes()` is run on repo.checkConnection()
ensureIndexes: function() {
var self = this;
if (!this.isConnected || !this.collectionName || !this.indexes) return;
this.indexes.forEach(function(index) {
var options;
index = index.index ? index.index : index;
options = index.options ? index.options : {};
self.client.ensureIndex(self.collectionName, index, options, function(err, indexName) {
// nothing todo.
});
});
},
// __checkConnection:__ Use this function to check if all is initialized correctly.

@@ -188,2 +208,3 @@ //

this.collection = new mongo.Collection(this.client, this.collectionName);
this.ensureIndexes();
}

@@ -190,0 +211,0 @@ },

2

package.json
{
"author": "adrai",
"name": "viewmodel",
"version": "0.5.4",
"version": "0.5.5",
"private": false,

@@ -6,0 +6,0 @@ "main": "index.js",

# Introduction
[![Build Status](https://secure.travis-ci.org/adrai/node-viewmodel.png)](http://travis-ci.org/adrai/node-viewmodel)
[![travis](https://img.shields.io/travis/adrai/node-viewmodel.svg)](https://travis-ci.org/adrai/node-viewmodel) [![npm](https://img.shields.io/npm/v/viewmodel.svg)](https://npmjs.org/package/viewmodel)

@@ -167,2 +167,2 @@ Node-viewmodel is a node.js module for multiple databases.

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
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