@tomsd/mongodbclient 2.5.0 → 2.6.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.
@@ -29,7 +29,7 @@ export declare class MClient {
29
29
  distinct(key: string, condition?: any): Promise<unknown>;
30
30
  remove(condition: any): Promise<unknown>;
31
31
  stats(): Promise<unknown>;
32
- count(condition: any): Promise<number>;
32
+ count(condition?: any): Promise<number>;
33
33
  insertMany(items: any[]): Promise<unknown>;
34
34
  dbStats(): Promise<unknown>;
35
35
  getCollections(): Promise<any[]>;
@@ -147,7 +147,7 @@ class MClient {
147
147
  }, reject);
148
148
  });
149
149
  }
150
- count(condition) {
150
+ count(condition = {}) {
151
151
  const that = this;
152
152
  return new Promise(function (resolve, reject) {
153
153
  that.getConnected()
@@ -29,7 +29,7 @@ export declare class MClient {
29
29
  distinct(key: string, condition?: any): Promise<unknown>;
30
30
  remove(condition: any): Promise<unknown>;
31
31
  stats(): Promise<unknown>;
32
- count(condition: any): Promise<number>;
32
+ count(condition?: any): Promise<number>;
33
33
  insertMany(items: any[]): Promise<unknown>;
34
34
  dbStats(): Promise<unknown>;
35
35
  getCollections(): Promise<any[]>;
@@ -143,7 +143,7 @@ export class MClient {
143
143
  }, reject);
144
144
  });
145
145
  }
146
- count(condition) {
146
+ count(condition = {}) {
147
147
  const that = this;
148
148
  return new Promise(function (resolve, reject) {
149
149
  that.getConnected()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomsd/mongodbclient",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "",
5
5
  "main": "dist/cjs/mongodbclient.js",
6
6
  "module": "dist/esm/mongodbclient.js",