IFClite TypeScript API
    Preparing search index...

    Function compareFilterValue

    • Evaluate a single comparison operator against a stored value and a filter value. Booleans are normalized first (see normalizeBooleanValue), and contains is case-insensitive — the settled semantics across the CLI/MCP query backends, now shared rather than duplicated.

      exists answers "is this property/quantity present", not "does it carry a non-null value" — a caller passes actual here only once it has already confirmed the property was found (e.g. IFCPROPERTYSINGLEVALUE('FireRating', $,$,$) is present in its pset with a $ nominal value, which parses to null; it still exists). So exists is unconditional true once reached.

      matches is a regex test — see matchesRegex for the exact delimiter/flag/error contract. It is NOT boolean-normalized: normalizing true/false to the strings 'true'/'false' before every other operator exists so .T./true/TRUE compare as equal, which has nothing to do with regex matching, and normalizing first would only make a pattern like /^\.T\.$/ (deliberately matching the raw STEP token) silently see 'true' instead.

      Parameters

      Returns boolean