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).
Parameters
Section titled “Parameters”Record<string, "asc" | "desc">
toField?
Section titled “toField?”(field) => string
Returns
Section titled “Returns”Record<string, 1 | -1>