Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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.ts
File · 0.45
Queue.test.ts
File · 0.45
MonoStack.test.ts
File · 0.45
visitFunction
Method · 0.45
Calls
1
isEmpty
Method · 0.95
Tested by
no test coverage detected