MCPcopy Index your code
hub / github.com/philc/vimium / getRandomInt

Function getRandomInt

make.js:283–283  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

281 const max = 65535;
282 let count = 0;
283 const getRandomInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
284 let port = getRandomInt(min, max);
285 while (!isPortAvailable(port) && count < max - min) {
286 port++;

Callers 1

getAvailablePortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected