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