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.15 to 0.2.0

5

History.md
0.2.0 / 2012-07-14
==================
* collection: added `count`
0.1.15 / 2012-07-14

@@ -3,0 +8,0 @@ ===================

@@ -391,2 +391,28 @@

/**
* count
*
* @param {Object} query
* @param {Function} completion callback
* @return {Promise}
* @api public
*/
Collection.prototype.count = function (query, fn) {
var promise = new Promise(this, 'find')
if (fn) {
promise.complete(fn);
}
// cast
query = this.cast(query);
// query
debug('%s count "%j"', this.name, query);
this.col.count(query, promise.fulfill);
return promise;
};
/**
* findOne

@@ -393,0 +419,0 @@ *

2

package.json
{
"name": "monk"
, "version": "0.1.15"
, "version": "0.2.0"
, "main": "lib/monk.js"

@@ -5,0 +5,0 @@ , "tags": ["mongodb", "mongo", "driver"]

@@ -128,2 +128,21 @@

describe('counting', function () {
it('should work', function (done) {
users.count({ a: 'counting' }, function (err, count) {
expect(err).to.be(null);
expect(count).to.be(0);
users.insert({ a: 'counting' }, function (err) {
expect(err).to.be(null);
users.count({ a: 'counting' }, function (err, count) {
expect(err).to.be(null);
expect(count).to.be(1);
done();
});
});
});
});
});
describe('updating', function () {

@@ -130,0 +149,0 @@ it('should update', function (done) {

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