Socket
Socket
Sign inDemoInstall

iridium

Package Overview
Dependencies
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iridium - npm Package Compare versions

Comparing version 2.11.4 to 2.12.0

test/find.js

23

lib/Model.js

@@ -537,3 +537,3 @@ var _ = require('lodash'),

Model.prototype.update = function (conditions, changes, callback) {
Model.prototype.update = function (conditions, changes, options, callback) {
/// <signature>

@@ -545,6 +545,25 @@ /// <summary>Updates all documents in the collection which match the specified conditions - making the requested changes</summary>

/// </signature>
/// <signature>
/// <summary>Updates all documents in the collection which match the specified conditions - making the requested changes</summary>
/// <param name="conditions" type="Object">The conditions used to select objects to be updated</param>
/// <param name="changes" type="Object">The changes to be made to objects in the collection</param>
/// <param name="options" type="Object">The options to be passed to the update method</param>
/// <param name="callback" value="(function(err, count) { })">A function to be called once the update has completed</param>
/// </signature>
options = options || {};
if(typeof options == 'function') {
callback = options;
options = {};
}
_.defaults(options, {
w: callback ? 1 : 0,
multi: true
});
this.toSource(conditions);
this.collection.update(conditions, changes, { w: callback ? 1 : 0, multi: true }, (function(err, modified) {
this.collection.update(conditions, changes, options, (function(err, modified) {
if (err) this.emit('error', err);

@@ -551,0 +570,0 @@ return callback(err, modified);

2

package.json
{
"name": "iridium",
"version": "2.11.4",
"version": "2.12.0",
"author": "Benjamin Pannell <admin@sierrasoftworks.com>",

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

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