Skip to content

toMongoSort

toMongoSort(sort, toField?): Record<string, 1 | -1>

Defined in: mongo-filter.ts:145

Translate a Mantle QueryParams.sort map to a MongoDB sort document (id → _id).

Record<string, "asc" | "desc">

(field) => string

Record<string, 1 | -1>