@sprucelabs/data-stores 12.0.13 → 12.0.14

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.
@@ -57,7 +57,6 @@ class NeDbDatabase extends AbstractMutexer_1.default {
57
57
  valuesToDocument(values) {
58
58
  const withId = this.toMongoId(values);
59
59
  const nullsToPlaceholder = this.handlePlaceholders(withId, NULL_PLACEHOLDER, (val) => val === null || typeof val === 'undefined' || val === NULL_PLACEHOLDER);
60
- // return nullsToPlaceholder
61
60
  const undefinedToPlaceholder = this.handlePlaceholders(nullsToPlaceholder, UNDEFINED_PLACEHOLDER, (val) => val === undefined || val === UNDEFINED_PLACEHOLDER);
62
61
  return undefinedToPlaceholder;
63
62
  }
@@ -86,6 +85,9 @@ class NeDbDatabase extends AbstractMutexer_1.default {
86
85
  }
87
86
  handlePlaceholders(values, dropIn, checker) {
88
87
  let withPlaceholders = Array.isArray(values) ? [] : {};
88
+ if (values instanceof RegExp) {
89
+ return values;
90
+ }
89
91
  if (Array.isArray(values)) {
90
92
  withPlaceholders = values.map((v) => this.handlePlaceholders(v, dropIn, checker));
91
93
  }
@@ -65,7 +65,6 @@ export default class NeDbDatabase extends AbstractMutexer {
65
65
  valuesToDocument(values) {
66
66
  const withId = this.toMongoId(values);
67
67
  const nullsToPlaceholder = this.handlePlaceholders(withId, NULL_PLACEHOLDER, (val) => val === null || typeof val === 'undefined' || val === NULL_PLACEHOLDER);
68
- // return nullsToPlaceholder
69
68
  const undefinedToPlaceholder = this.handlePlaceholders(nullsToPlaceholder, UNDEFINED_PLACEHOLDER, (val) => val === undefined || val === UNDEFINED_PLACEHOLDER);
70
69
  return undefinedToPlaceholder;
71
70
  }
@@ -98,6 +97,9 @@ export default class NeDbDatabase extends AbstractMutexer {
98
97
  }
99
98
  handlePlaceholders(values, dropIn, checker) {
100
99
  let withPlaceholders = Array.isArray(values) ? [] : {};
100
+ if (values instanceof RegExp) {
101
+ return values;
102
+ }
101
103
  if (Array.isArray(values)) {
102
104
  withPlaceholders = values.map((v) => this.handlePlaceholders(v, dropIn, checker));
103
105
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "12.0.13",
6
+ "version": "12.0.14",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "!build/__tests__",