New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.26 to 1.3.27

37

lib/collectionModel.js

@@ -565,4 +565,41 @@ 'use strict';

}
/*
const bulkOps = [
{
updateOne: {
filter: { _id: 1 },
update: { $set: { name: 'newName1' } }
}
},
{
updateOne: {
filter: { _id: 2 },
update: { $set: { name: 'newName2' } }
}
},
// Add more update operations as needed
];
*/
async bulkWrite(bulkOps) {
return new Promise((resolve, reject) => {
const { hrstart, runId } = util.startTimer();
this.Model.bulkWrite(bulkOps, (err, result) => {
if (err) {
reject(err);
}
util.logFunctionTimer({
file: 'collectionModel.js',
class: this.modelName,
function: 'bulkWrite',
params: query,
hrstart,
runId,
});
return resolve(result);
});
});
}
}
module.exports = CollectionModel;

2

package.json
{
"name": "node-simple-collectionmodel",
"description": "A simpel and nice collection model for mongoose stuff.",
"version": "1.3.26",
"version": "1.3.27",
"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