MCPcopy
hub / github.com/graphif/project-graph / peek

Method peek

packages/data-structures/src/Queue.ts:22–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21 // 查看队首元素
22 peek(): T | undefined {
23 if (this.isEmpty()) {
24 return undefined;
25 }
26 return this.items[0];
27 }
28
29 tail(): T | undefined {
30 if (this.isEmpty()) {

Callers 4

Stack.test.tsFile · 0.45
Queue.test.tsFile · 0.45
MonoStack.test.tsFile · 0.45
visitFunctionMethod · 0.45

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected