UNPKG

479 BJavaScriptView Raw
1import i from"fs";const s=e=>{let o="";for(let t=0;t<e.length;t+=1){const r=e[t],n=r.toUpperCase();o+=r===n?r.toLowerCase():n}return o},c=65,a=97,m=()=>Math.floor(Math.random()*26),S=e=>Array.from({length:e},()=>String.fromCodePoint(m()+(Math.random()>.5?c:a))).join(""),l=(e=i)=>{const o=process.execPath;if(e.existsSync(o))return!e.existsSync(s(o));const t=`/${S(10)}`;e.writeFileSync(t,"");const r=!e.existsSync(s(t));return e.unlinkSync(t),r};export{l as isFsCaseSensitive};