Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/graphif/project-graph
/ unsafePeek
Method
unsafePeek
packages/data-structures/src/MonoStack.ts:46–48 ·
view source on GitHub ↗
* 不安全的获取栈顶元素 * 如果栈为空,则会抛出异常
()
Source
from the content-addressed store, hash-verified
44
* 如果栈为空,则会抛出异常
45
*/
46
unsafePeek(): T {
47
return
this.stack[this.stack.length - 1].item;
48
}
49
50
// 获取从栈底到栈顶的元素数,第几个元素
51
get(index: number): T | undefined {
Callers
1
MonoStack.test.ts
File · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected