MCPcopy Create free account
hub / github.com/ampproject/amphtml / sequentialIdGenerator

Function sequentialIdGenerator

src/core/data-structures/id-generator.js:5–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3 * @return {function():string}
4 */
5export function sequentialIdGenerator() {
6 let counter = 0;
7 return () => String(++counter);
8}
9
10/**
11 * Returns a function that generates a random id in string format. The random

Callers 6

component.jsFile · 0.90
consumer.jsFile · 0.90
useMegaMenu.tsxFile · 0.90
component.jsFile · 0.90
parse-props.jsFile · 0.90
ProxyIframeEmbedWithRefFunction · 0.90

Calls 1

StringFunction · 0.50

Tested by

no test coverage detected