UNPKG

@mcabreradev/filter

Version:

A powerful, SQL-like array filtering library for TypeScript and JavaScript with advanced pattern matching, MongoDB-style operators, deep object comparison, and zero dependencies

11 lines 387 B
import { OPERATOR_KEYS } from '../constants'; import { isObject } from './type-guards'; export const isOperatorExpression = (value) => { if (!isObject(value)) return false; return Object.keys(value).some((key) => OPERATOR_KEYS.includes(key)); }; export const hasOperator = (obj, operator) => { return operator in obj; }; //# sourceMappingURL=operator-detection.js.map