MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / generateId

Function generateId

apps/OpenSign/src/constant/Utils.js:218–228  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

216
217// `generateId` generates a random alphanumeric ID of specified length.
218export function generateId(length) {
219 const characters =
220 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
221 let result = "";
222 const charactersLength = characters.length;
223
224 for (let i = 0; i < length; i++) {
225 result += characters.charAt(Math.floor(Math.random() * charactersLength));
226 }
227 return result;
228}
229
230/**
231 * Removes a trailing path segment from a URL string, if present.

Callers 4

RadioButtonWidgetFunction · 0.90
addWidgetOptionsFunction · 0.70
addWidgetSelfsignOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected