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

senter-mongo-repository

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

senter-mongo-repository - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

10

mongoReposotory.js

@@ -63,3 +63,3 @@ const MongoClient = require('mongodb').MongoClient;

async search(searchTerm, limit = 1000) {
async search(searchTerm, limit = 1000, projection = null) {
if (!searchTerm) {

@@ -72,4 +72,10 @@ throw Error("Mongo repository: search error: searchTerm cannot be null or empty");

let docs = await this._collection.find(searchTerm).limit(limit).toArray();
var query = this._collection.find(searchTerm).limit(limit);
if (projection)
{
query = query.project(projection);
}
let docs = await query.toArray();
docs.forEach(x => {

@@ -76,0 +82,0 @@ x.id = x._id;

2

package.json
{
"name": "senter-mongo-repository",
"version": "1.0.6",
"version": "1.0.7",
"description": "Contain methods to work with mongo db",

@@ -5,0 +5,0 @@ "main": "mongoReposotory.js",

@@ -5,3 +5,3 @@ const MongoRepository = require("../mongoReposotory");

const connectionString = 'mongodb+srv://sandbox:MLiGyVdt97ECQSbO876hPtGExk36sp15@sandbox-5zqkh.mongodb.net/test?retryWrites=true&w=majority';
const connectionString = '';
const dbName = 'senter';

@@ -8,0 +8,0 @@ const collectionName = MongoRepository.ContactListsCollectionName;

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