mirror of
https://github.com/vastxie/99AI.git
synced 2025-11-12 19:53:42 +08:00
NineAI 2.4.2
This commit is contained in:
14
dist/common/utils/createRandomInviteCode.js
vendored
Normal file
14
dist/common/utils/createRandomInviteCode.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.generateRandomString = void 0;
|
||||
function generateRandomString() {
|
||||
const length = 10;
|
||||
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
let result = '';
|
||||
for (let i = 0; i < length; i++) {
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
result += characters.charAt(randomIndex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.generateRandomString = generateRandomString;
|
||||
Reference in New Issue
Block a user