"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.randStr = void 0;
const idStrings = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
/**
 * Generate random string
 * @param  {} number=2
 */
function randStr(number = 2) {
    let str = '';
    for (let i = 0; i < number; i++) {
        const pos = Math.round(Math.random() * (idStrings.length - 1));
        str += idStrings[pos];
    }
    return str;
}
exports.randStr = randStr;
const shortId = (len = 15) => randStr(len);
exports.default = shortId;
