MCPcopy Create free account
hub / github.com/dadi/api / isOperatorQuery

Function isOperatorQuery

dadi/lib/fields/reference.js:245–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244module.exports.beforeQuery = function({config, field, input, options}) {
245 const isOperatorQuery = tree => {
246 return Boolean(
247 tree &&
248 Object.keys(tree).every(key => {
249 return key[0] === '$'
250 })
251 )
252 }
253
254 if (isOperatorQuery(input[field])) {
255 return input

Callers 2

reference.jsFile · 0.85
processTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected