viewdb 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/cursor.js +6 -12
  2. package/package.json +1 -1
package/lib/cursor.js CHANGED
@@ -63,19 +63,13 @@ Cursor.prototype.rewind = function (options) {
63
63
  //NOOP
64
64
  };
65
65
 
66
- Cursor.prototype.count = function (applySkipLimit, callback) {
67
- if (_.isFunction(applySkipLimit)) {
68
- callback = applySkipLimit;
69
- applySkipLimit = false;
70
- }
66
+ Cursor.prototype.count = function (callback) {
71
67
  var query = { query: this._query.query };
72
- if (applySkipLimit) {
73
- if (this._query.skip) {
74
- query.skip = this._query.skip;
75
- }
76
- if (this._query.limit) {
77
- query.limit = this._query.limit;
78
- }
68
+ if (this._query.skip) {
69
+ query.skip = this._query.skip;
70
+ }
71
+ if (this._query.limit) {
72
+ query.limit = this._query.limit;
79
73
  }
80
74
  this._getDocuments(query, function (err, res) {
81
75
  callback(err, res && res.length);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewdb",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "directories": {