1 |
- function s(r){let e=r.replace(/(^\s*)|(\s*$)/g,"");return e=e.replace(/[\.]*/g,""),e=e.replace(/(^0[\d]*)$/g,"0"),e=e.replace(/^0\d$/g,"0"),e=e.replace(/[^\d]/g,""),e}const n=(r,e)=>{const i=r.indexOf("."),t=r.substring(i);return!(e=="video"&&!/(.*)\.(mp4|rmvb|avi|ts)$/.test(t)||e=="image"&&!/(.*)\.(gif|jpg|jpeg|png|GIF|JPG|PNG|svg)$/.test(t))};export{n as c,s as v};
|