1 2 3 4 5 6 7 8 9 10 11 12 13 | 3x 3x 1x 1x 1x 1x | /* eslint-disable default-case*/ export default (suc, err, status)=>(xhr)=>{ switch (status(xhr.status, xhr.readyState)){ case -1: err(xhr.responseText, xhr.statusText, xhr.status); break; case 1: suc(xhr.responseText); break; } }; /* eslint-enable */ |