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

Function randInt

build-system/server/routes/list.js:29–31  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

27 * Infinite scroll related endpoints.
28 */
29const randInt = (n) => {
30 return Math.floor(Math.random()) * n;
31};
32
33const squareImgUrl = (width) => {
34 return `http://picsum.photos/${width}?${randInt(50)}`;

Callers 5

squareImgUrlFunction · 0.85
randomFalsyFunction · 0.85
generateJsonFunction · 0.85
generateResultsFunction · 0.85
generateJsonWithStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected