actor/base/src/main/resources/js/helpers.js
function $randomString(length, characterPool)
{
    if (typeof characterPool !== 'string') {
        characterPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    }
    
    var text = "";
    for (var i = 0; i < length; i++) {
        text += characterPool.charAt(Math.floor(Math.random() * characterPool.length));
    }

    return text;
}
function $randomString(length, characterPool)
{
    if (typeof characterPool !== 'string') {
        characterPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
    }
    
    var text = "";
    for (var i = 0; i < length; i++) {
        text += characterPool.charAt(Math.floor(Math.random() * characterPool.length));
    }

    return text;
}
Returns a random string with the specified length by randomly
selecting characters from the pool provided. If the character
pool is not provided, the default pool will contain all numbers
and letters (both uppercase and lowercase).
Usage:
$randomString(5); // 2U8cA
$randomString(5, "ABC123"); // AB2AC