New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

monk

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monk - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

6

History.md
0.1.12 / 2012-05-25
===================
* Added package.json tags.
* Added support for update with ids (fixes #4)
0.1.11 / 2012-05-22

@@ -3,0 +9,0 @@ ===================

4

lib/collection.js

@@ -135,2 +135,6 @@

Collection.prototype.update = function (search, update, opts, fn) {
if ('string' == typeof search || 'function' == typeof search.toHexString) {
return this.update({ _id: search }, update, opts, fn);
}
if ('function' == typeof opts) {

@@ -137,0 +141,0 @@ fn = opts;

3

package.json
{
"name": "monk"
, "version": "0.1.11"
, "version": "0.1.12"
, "main": "lib/monk.js"
, "tags": ["mongodb", "mongo", "driver"]
, "dependencies": {

@@ -6,0 +7,0 @@ "mongoskin": "0.3.6"

@@ -130,2 +130,30 @@

});
it('should work with an objectid', function (done) {
users.insert({ worked: false }, function (err, doc) {
expect(err).to.be(null);
users.update(doc._id, { $set: { worked: true } }, function (err) {
expect(err).to.be(null);
users.findOne(doc._id, function (err, doc) {
expect(err).to.be(null);
expect(doc.worked).to.be(true);
done();
});
});
});
});
it('should work with an objectid (string)', function (done) {
users.insert({ worked: false }, function (err, doc) {
expect(err).to.be(null);
users.update(doc._id.toString(), { $set: { worked: true } }, function (err) {
expect(err).to.be(null);
users.findOne(doc._id, function (err, doc) {
expect(err).to.be(null);
expect(doc.worked).to.be(true);
done();
});
});
});
});
});

@@ -132,0 +160,0 @@

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