MCPcopy Create free account
hub / github.com/badrap/sorted-queue / constructor

Method constructor

src/index.ts:7–10  ·  view source on GitHub ↗
(cmp: Cmp<T> = defaultCmp)

Source from the content-addressed store, hash-verified

5 private _array: Item<T>[];
6
7 constructor(cmp: Cmp<T> = defaultCmp) {
8 this._cmp = cmp;
9 this._array = [];
10 }
11
12 push(value: T): SortedQueueItem<T> {
13 const item = new Item(value, this._array, this._array.length, this._cmp);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected