mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-05-09 12:09:11 +08:00
2 lines
390 B
JavaScript
2 lines
390 B
JavaScript
const a=(n,e)=>Object.prototype.toString.call(n).includes(e),l=(n=16,e)=>{const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[];let t=0;if(e=e||r.length,n)for(t=0;t<n;t++)o[t]=r[0|Math.random()*e];else{let s;for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",t=0;t<36;t++)o[t]||(s=0|Math.random()*16,o[t]=r[t===19?s&3|8:s])}return o.join("")};export{l as u,a as v};
|