race-resolver
v1.0.1
Published
a way to resolve race condition
Downloads
1
Maintainers
Readme
install
npm i race-resolver -S
usage
import resolveRace from 'race-resolver';
async function request(isExpires, params){
try {
const res = await axios.get('/api/path', params);
if(!isExpires.value){
// handle res
}
} catch(){
// ...
} finally {
// ...
}
}
const getData = resolveRace(request);
getData({id:1});