DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/functions/makeComparator.md
makeComparator
ts
function makeComparator(opts, scope?): (a, b) => number;Defined in: packages/db/src/utils/comparison.ts:141
Internal
Used by first-party collection adapters.
Parameters#
opts#
CompareOptions
scope?#
"values" | "index" = ...
Returns#
(a, b) => number