MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getRandomInt

Function getRandomInt

web/pgadmin/static/js/utils.js:228–234  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

226}
227
228export function getRandomInt(min, max) {
229 const intArray = new Uint32Array(1);
230 crypto.getRandomValues(intArray);
231
232 let range = max - min + 1;
233 return min + (intArray[0] % range);
234}
235
236/*
237 * Extracts the background and foreground colors from a server icon string.

Callers 6

openPsqlToolMethod · 0.90
showErdToolMethod · 0.90
generateScriptFunction · 0.90
showERDSqlToolFunction · 0.90
refreshServerListMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected