Inital Commit

This commit is contained in:
root
2025-06-24 15:43:32 +02:00
commit 23341b8abb
4657 changed files with 549083 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createID = createID;
const node_crypto_1 = __importDefault(require("node:crypto"));
function createID(prefix = '', length = 16) {
const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const values = new Uint8Array(length);
node_crypto_1.default.getRandomValues(values);
const id = Array.from(values, v => charset[v % charset.length]).join('');
if (prefix)
return `${prefix}-${id}`;
return id;
}
//# sourceMappingURL=create-id.js.map