Node.js examples for String:String Value
Generate Random String from signs and letters
function generateRandomString(length){ var charset = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789 !"#$%&\'()*+,-./:;<=>?@[\\]_{}'; var randomValues = new Uint8Array(length); crypto.getRandomValues(randomValues);//w w w . j av a 2 s. c om var string = ''; for(var i = 0; i < length; i++){ string += charset[randomValues[i]%charset.length]; } return string; }