yaml-admin-api 0.0.78 → 0.0.79

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yaml-admin-api",
3
- "version": "0.0.78",
3
+ "version": "0.0.79",
4
4
  "license": "MIT",
5
5
  "description": "YAML Admin API package",
6
6
  "type": "commonjs",
@@ -121,6 +121,20 @@ const generateCrud = async ({ app, db, entity_name, yml_entity, yml, options })
121
121
  return { $ne: null }
122
122
  else if(value == 'null')
123
123
  return null
124
+ if(value?.startsWith('$')) {
125
+ const [op, val] = value.split(' ')
126
+ if(op == '$lte')
127
+ return { $lte: parseFloat(val) }
128
+ else if(op == '$gte')
129
+ return { $gte: val }
130
+ else if(op == '$lt')
131
+ return { $lt: val }
132
+ else if(op == '$gt')
133
+ return { $gt: val }
134
+ else
135
+ return value
136
+ }
137
+
124
138
  if (type == 'boolean') {
125
139
  if(value == 'true')
126
140
  return true