2.0.0 • Published 2 years ago
@itsy/abortable v2.0.0
@itsy/abortable
use
import { Abortable } from '@itsy/abortable'
import ky from 'ky'
let loading = false
const updater = new Abortable()
updater.callbacks({
updateCb() {
loading = true
return ky.get('/foo/bar', { signal: updater.signal })
},
catchCb(err) {
console.error('Failed to update due to', err)
},
finallyCb() {
loading = false
}
})
1.1.0
2 years ago
2.0.0-next.0
2 years ago
2.0.0-next.1
2 years ago
2.0.0
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago