@mantlebee/ts-data
    Preparing search index...

    Function toComparableValue

    • Converts a value of an item, or of a filter, into the primitive the in-memory delegates compare with ===, < and >:

      • null and undefined become null (an unset value);
      • numbers, booleans and the other primitives stay as they are;
      • strings are lower-cased, unless caseSensitive is true;
      • a Date becomes its getTime();
      • any other object becomes its valueOf() when that returns a primitive (so the value objects of the consumer plug in without being a dependency of the package), converted with the same rules; otherwise it stays as it is and is compared by reference. Override it per field with InMemoryQueryItemsReaderOptions.toComparable.

      Parameters

      • value: unknown

        Value to convert.

      • caseSensitive: boolean = false

        true to leave the strings as they are.

      Returns unknown

      the comparable value, null when unset.