Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/tldraw/tldraw
/ randomElement
Method
randomElement
packages/sync-core/src/test/RandomSource.ts:43–45 ·
view source on GitHub ↗
(items: Elem[])
Source
from the content-addressed store, hash-verified
41
}
42
43
randomElement<Elem>(items: Elem[]): Elem | undefined {
44
return
items[this.randomInt(items.length)]
45
}
46
}
Callers
2
getRandomShapeId
Method · 0.80
getRandomOp
Method · 0.80
Calls
1
randomInt
Method · 0.95
Tested by
no test coverage detected