MCPcopy Create free account
hub / github.com/Semporia/Scripts / getRandomIDPro

Function getRandomIDPro

jd_factory_component.js:447–468  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

445}
446
447function getRandomIDPro() {
448 var e,
449 t,
450 a = void 0 === (n = (t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).size) ? 10 : n,
451 n = void 0 === (n = t.dictType) ? 'number' : n,
452 i = '';
453 if ((t = t.customDict) && 'string' == typeof t) e = t;
454 else
455 switch (n) {
456 case 'alphabet':
457 e = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
458 break;
459 case 'max':
460 e = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-';
461 break;
462 case 'number':
463 default:
464 e = '0123456789';
465 }
466 for (; a--; ) i += e[(Math.random() * e.length) | 0];
467 return i;
468}
469
470async function requestAlgo() {
471 $.fp = (getRandomIDPro({ size: 13 }) + Date.now()).slice(0, 16);

Callers 1

requestAlgoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected