c2-mongoose 2.1.298 → 2.1.300

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.
@@ -278,7 +278,7 @@ var SearcherFlow = /** @class */ (function () {
278
278
  condition[key] = { $in: value };
279
279
  }
280
280
  else {
281
- condition[key] = value;
281
+ condition[key] = { $size: 0 };
282
282
  }
283
283
  }
284
284
  }
@@ -312,7 +312,7 @@ var SearcherFlow = /** @class */ (function () {
312
312
  var andQueriesParam = {};
313
313
  Object.entries(objectSearch).forEach(function (_a) {
314
314
  var key = _a[0], value = _a[1];
315
- if ((0, Utils_1.isNotEmpty)(value) || value === null) {
315
+ if (value !== undefined || value === null) {
316
316
  if ([
317
317
  'or',
318
318
  'filters',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.298",
3
+ "version": "2.1.300",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -255,7 +255,7 @@ class SearcherFlow<D> {
255
255
  if (value.length > 0) {
256
256
  condition[key] = { $in: value };
257
257
  } else {
258
- condition[key] = value;
258
+ condition[key] = { $size: 0 };
259
259
  }
260
260
  }
261
261
  } else if (Array.isArray(value)) {
@@ -290,7 +290,7 @@ class SearcherFlow<D> {
290
290
 
291
291
  let andQueriesParam = {} as any
292
292
  Object.entries(objectSearch).forEach(([key, value]) => {
293
- if (isNotEmpty(value) || value === null) {
293
+ if (value !== undefined || value === null) {
294
294
  if ([
295
295
  'or',
296
296
  'filters',