Socket
Socket
Sign inDemoInstall

iridium

Package Overview
Dependencies
8
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.1 to 7.0.2

23

dist/lib/Model.js

@@ -330,17 +330,14 @@ "use strict";

return new Bluebird((resolve, reject) => {
if (opts.multi)
return this.collection.updateMany(conditions, changes, opts, (err, response) => {
if (err)
return reject(err);
// New MongoDB 2.6+ response type
if (response.result && response.result.nModified !== undefined)
return resolve(response.result.nModified);
// Legacy response type
return resolve(response.result.n);
});
return this.collection.update(conditions, changes, opts, (err, response) => {
const callback = (err, response) => {
if (err)
return reject(err);
return resolve(1);
});
// New MongoDB 2.6+ response type
if (response.result && response.result.nModified !== undefined)
return resolve(response.result.nModified);
// Legacy response type
return resolve(response.result.n);
};
if (opts.multi)
return this.collection.updateMany(conditions, changes, opts, callback);
return this.collection.updateOne(conditions, changes, opts, callback);
});

@@ -347,0 +344,0 @@ }).nodeify(callback);

@@ -676,2 +676,3 @@ "use strict";

return model.get().then(instance => {
instance.answer++;
return chai.expect(model.update(instance._id, instance.document, { multi: false })).to.eventually.equal(1);

@@ -678,0 +679,0 @@ });

{
"name": "iridium",
"version": "7.0.1",
"version": "7.0.2",
"author": "Benjamin Pannell <admin@sierrasoftworks.com>",

@@ -5,0 +5,0 @@ "description": "A custom lightweight ORM for MongoDB designed for power-users",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc