MCPcopy Create free account
hub / github.com/blacksmithgu/datacore / sort

Method sort

src/api/data-array.ts:70–70  ·  view source on GitHub ↗

* Return a sorted array sorted by the given key; an optional comparator can be provided, which will * be used to compare the keys in leiu of the default dataview comparator.

(key: ArrayFunc<T, U>, direction?: "asc" | "desc", comparator?: ArrayComparator<U>)

Source from the content-addressed store, hash-verified

68 * be used to compare the keys in leiu of the default dataview comparator.
69 */
70 sort<U>(key: ArrayFunc<T, U>, direction?: "asc" | "desc", comparator?: ArrayComparator<U>): DataArray<T>;
71
72 /**
73 * Mutably modify the current array with an in place sort; this is less flexible than a regular sort in exchange

Callers 9

markdownSourceImportFunction · 0.65
extractInlineFieldsFunction · 0.65
sortMethod · 0.65
sortInPlaceMethod · 0.65
distinctMethod · 0.65
functions.tsFile · 0.65
parser.tsFile · 0.65
compareFunction · 0.65
setIntersectFunction · 0.65

Implementers 1

DataArrayImplsrc/api/data-array.ts

Calls

no outgoing calls

Tested by

no test coverage detected