Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ampproject/amphtml
/ randomIdGenerator
Function
randomIdGenerator
src/core/data-structures/id-generator.js:16–18 ·
view source on GitHub ↗
(maxValue)
Source
from the content-addressed store, hash-verified
14
* @
return
{
function
():string}
15
*/
16
export
function
randomIdGenerator(maxValue) {
17
return
() => String(Math.floor(Math.random() * maxValue));
18
}
Callers
2
useMegaMenu.tsx
File · 0.90
component.js
File · 0.90
Calls
1
String
Function · 0.50
Tested by
no test coverage detected