MCPcopy Create free account
hub / github.com/codemix/graph / constructor

Method constructor

packages/graph/src/indexes/BTreeIndex.ts:43–51  ·  view source on GitHub ↗
(
    label: string,
    property: string,
    comparator?: (a: number | string, b: number | string) => number,
  )

Source from the content-addressed store, hash-verified

41 #comparator: ((a: number | string, b: number | string) => number) | undefined;
42
43 public constructor(
44 label: string,
45 property: string,
46 comparator?: (a: number | string, b: number | string) => number,
47 ) {
48 this.label = label;
49 this.property = property;
50 this.#comparator = comparator;
51 }
52
53 #compare(a: number | string, b: number | string): number {
54 if (this.#comparator) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected