"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateCode = generateCode;
const crypto_1 = require("crypto");
const DEFAULT_ALPHABET = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789';
function generateCode(length = 10, alphabet = DEFAULT_ALPHABET) {
    let code = '';
    for (let index = 0; index < length; index += 1) {
        code += alphabet[(0, crypto_1.randomInt)(0, alphabet.length)];
    }
    return code;
}
//# sourceMappingURL=code-generator.js.map