It's very useful when do testing or mock backend API without real backend.
TODOs:
[x] First version
[x] Unit tests
[x] Improve types
[x] Documentation of mock plugin
[x] Changelog and Publish
The error cache plugin is when the GET data API wrong but have cache, don't throw error, use the cache data,
And you can know the data is from the cache by fromCache: boolean.
It's different with cache plugin: cache plugin if have cache data then use the cache data, if request error, throw error
Mock plugin inspired from:
https://github.com/ctimmerm/axios-mock-adapter
It's very useful when do testing or mock backend API without real backend.
TODOs:
The
error cache
plugin is when theGET
data API wrong but have cache, don't throw error, use the cache data, And you can know the data is from the cache byfromCache: boolean
.Dedupe
plugin support[x] documentation
UMD support:
Let people just load xior in the browser.