Source: utils/string-generator.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringGenerator = void 0;
/**
 * Generates a random string with letters and numbers
 * @function stringGenerator
 * @param {number} length	string desired length
 * @return {string} result 	the generated string
 **/
function stringGenerator(length = 32) {
    const chars = 'asdfghjklzxcvbnmqwertyuiop0123456789'.split('');
    const result = [];
    for (let i = 0; i < length; i++) {
        result.push(chars[Math.floor(Math.random() * chars.length)]);
    }
    return result.join('');
}
exports.stringGenerator = stringGenerator;
//# sourceMappingURL=string-generator.js.map