MCPcopy Create free account
hub / github.com/loopbackio/loopback-next / isFilter

Function isFilter

packages/filter/src/query.ts:254–264  ·  view source on GitHub ↗
(
  candidate: any,
)

Source from the content-addressed store, hash-verified

252 * @param candidate
253 */
254export function isFilter<MT extends object>(
255 candidate: any,
256): candidate is Filter<MT> {
257 if (typeof candidate !== 'object') return false;
258 for (const key in candidate) {
259 if (!filterFields.includes(key)) {
260 return false;
261 }
262 }
263 return true;
264}
265
266/**
267 * A builder for Where object. It provides fluent APIs to add clauses such as

Callers 3

imposeMethod · 0.85
query.unit.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected