UNPKG

qsu

Version:

qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.

1 lines 216 B
export function strRandom(t,o){const r=`abcdefghijklmnopqrstuvwxyz0123456789${o}`,a=r.length;let n,e="";for(let o=0;o<t;o+=1)n=r.charAt(Math.floor(Math.random()*a)),n=Math.random()<.5?n.toUpperCase():n,e+=n;return e}