1 |
- function n(a){let t=new FileReader;return new Promise(r=>{t.addEventListener("load",e=>{let l;if(!!e.target){if(typeof e.target.result=="object"){if(!e.target.result)return;l=new Blob([e.target.result])}else l=e.target.result;r(l)}}),t.readAsArrayBuffer(a)})}const o=a=>new Promise(t=>{let r=new FileReader;r.onload=()=>{const e=r.result;t(e)},r.readAsText(a,"GBK")});export{n as f,o as r};
|