Skip to content

Commit

Permalink
undocumented option to pass the 64-char charset to str_random()
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasq committed Apr 1, 2020
1 parent 4c60896 commit 19d2d84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qibl.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ function str_truncate( string, limit, opts ) {
// var _random_charset = 'aaabccdeeeeeeffghiiijkllmnnnnooopqrrrrssstttttuuvwxyz ';
// var _random_charset = 'aaabccdeeeee ffghiiijkllmnnn ooopqrrr ssstttt uuvwxyz ';
var _random_charset = 'aaab ccde eeee ffgh iiij kllm nnn ooop qrrr ssst ttt uuvw xyz ';
function str_random( len ) {
var hex_charset = '0123456789abcdef01234567-9abcdef0123456789a-cdef0123456789abcdef';
function str_random( len, charset ) {
charset = charset || _random_charset;
var s = '';

while (len > 0) {
Expand Down

0 comments on commit 19d2d84

Please sign in to comment.