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

node-simple-collectionmodel

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-simple-collectionmodel - npm Package Compare versions

Comparing version 1.3.17 to 1.3.18

34

lib/collectionModel.js

@@ -259,21 +259,21 @@ 'use strict';

async distinct(field, query = {}, options = {}) {
try {
async distinct(field, query = {}) {
return new Promise(async (resolve, reject) => {
const { hrstart, runId } = util.startTimer();
const documents = await this.Model.distinct(field, query, options)
.lean();
util.logFunctionTimer({
file: 'collectionModel.js',
class: this.modelName,
function: 'distinct',
field,
params: query,
hrstart,
runId,
this.Model.distinct(field, query, (err, result) => {
if (err) {
return reject(err);
}
util.logFunctionTimer({
file: 'collectionModel.js',
class: this.modelName,
function: 'distinct',
field,
params: query,
hrstart,
runId,
});
return resolve(result);
});
return documents;
} catch (error) {
console.error(`${this.modelName}.distinct: ${field} ${JSON.stringify(query, null, 4)}: ${error}`);
}
});
}

@@ -280,0 +280,0 @@

{
"name": "node-simple-collectionmodel",
"description": "A simpel and nice collection model for mongoose stuff.",
"version": "1.3.17",
"version": "1.3.18",
"homepage": "https://github.com/5orenso/node-simple-collectionmodel",

@@ -6,0 +6,0 @@ "repository": {

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