Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anomalyco/opencode
/ getValue
Function
getValue
packages/opencode/test/util/lazy.test.ts:7–10 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
5
test(
"should call function only once"
, () => {
6
let
callCount = 0
7
const
getValue = () => {
8
callCount++
9
return
"expensive value"
10
}
11
12
const
lazyValue = lazy(getValue)
13
Callers
2
createPacedValue
Function · 0.50
run
Function · 0.50
Calls
no outgoing calls
Tested by
no test coverage detected