MCPcopy
hub / github.com/mongodb/node-mongodb-native / mapToMap

Function mapToMap

src/sort.ts:109–115  ·  view source on GitHub ↗

@internal

(t: ReadonlyMap<string, SortDirection>)

Source from the content-addressed store, hash-verified

107
108/** @internal */
109function mapToMap(t: ReadonlyMap<string, SortDirection>): SortForCmd {
110 const sortEntries: SortPairForCmd[] = Array.from(t).map(([k, v]) => [
111 `${k}`,
112 prepareDirection(v)
113 ]);
114 return new Map(sortEntries);
115}
116
117/** converts a Sort type into a type that is valid for the server (SortForCmd) */
118export function formatSort(

Callers 1

formatSortFunction · 0.85

Calls 2

prepareDirectionFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected