You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
404 B
2 lines
404 B
function s(e,r){const t=r.join("|");return new RegExp("\\.("+t+")$","i").test(e.name)}function c(e){return i(e.name)}function i(e){return/\.(jpg|jpeg|png|gif)$/i.test(e)}function a(e){return new Promise((r,t)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>r({result:n.result,file:e}),n.onerror=o=>t(o)})}export{s as checkFileType,c as checkImgType,a as getBase64WithFile,i as isImgTypeByName};
|