@grafana/faro-core
Version:
Core package of Faro.
12 lines • 476 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.genShortID = void 0;
var alphabet = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789';
function genShortID(length) {
if (length === void 0) { length = 10; }
return Array.from(Array(length))
.map(function () { return alphabet[Math.floor(Math.random() * alphabet.length)]; })
.join('');
}
exports.genShortID = genShortID;
//# sourceMappingURL=shortId.js.map