MCPcopy Create free account
hub / github.com/breck7/scroll / getRandomCharacters

Method getRandomCharacters

external/.scrollLibs.js:14094–14101  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

14092 }
14093 // generate a random alpha numeric hash:
14094 static getRandomCharacters(length) {
14095 const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
14096 let result = ""
14097 for (let i = 0; i < length; i++) {
14098 result += characters.charAt(Math.floor(Math.random() * characters.length))
14099 }
14100 return result
14101 }
14102 static isNodeJs() {
14103 return typeof exports !== "undefined"
14104 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected