MCPcopy Create free account
hub / github.com/bugy/script-server / randomInt

Function randomInt

web-src/src/common/utils/common.js:665–675  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

663}
664
665export function randomInt(start, end) {
666 if (start > end) {
667 start++;
668 end++;
669 } else if (end === start) {
670 return start;
671 }
672
673 const random = Math.random() * (end - start);
674 return Math.floor(random) + start
675}
676
677export function trimTextNodes(el) {
678 for (let node of el.childNodes) {

Callers 1

common_test.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected