MCPcopy 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 */
16export function randomIdGenerator(maxValue) {
17 return () => String(Math.floor(Math.random() * maxValue));
18}

Callers 2

useMegaMenu.tsxFile · 0.90
component.jsFile · 0.90

Calls 1

StringFunction · 0.50

Tested by

no test coverage detected