create-nkvs-mongoose-hono 1.0.13 → 1.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.
@@ -113,6 +113,25 @@ function filterHandler({ query, filter }) {
113
113
  }
114
114
  }
115
115
 
116
+ for (const key in filter) {
117
+ if (key.endsWith('regex')) {
118
+ const [_key] = key.split(':')
119
+ filter[_key] = {
120
+ $regex: filter[key],
121
+ $options: 'i'
122
+ }
123
+ delete filter[key]
124
+ }
125
+
126
+ if (key === 'active') {
127
+ if (filter[key] === 'true') {
128
+ filter[key] = true
129
+ } else {
130
+ filter[key] = false
131
+ }
132
+ }
133
+ }
134
+
116
135
  return filter
117
136
  }
118
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nkvs-mongoose-hono",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Create a mongoose-hono project.",
5
5
  "bin": {
6
6
  "create-nkvs-mongoose-hono": "index.js"