json-fs-query
    Preparing search index...

    Function compareAs

    • Normalize a value to a field's declared type for an equality comparison - never written back, only compared. Writes are coerced to the declared type (typeCheck), but values already stored may not match it (ids declared string, so they can hold an integer or a UUID, are often stored as numbers), and query literals carry their own type. A declared type is what says '3' and 3 are the same value. A missing or unrecognized type returns the value unchanged.

      Parameters

      • type: string
      • value: any

      Returns any