zfetchz
fetch has timeout and interceptor; Doc: https://klren0312.github.io/zfetch/
Install
$ npm install zfetchz --save
Build
$ npm run build
Test
$ npm run test
Usage
1.Init
If use it in Browser, you should use in browser' in first param; Else if you use it in NodeJS, you should use 'node' in first param. The second param is timeout, when you fetch data
const z = 'browser' 2000;
2.config interceptor (Default no interceptor)
var zfetchzInterceptor = zinterceptorzfetchzInterceptor
3.If you want to unregister the interceptor, you should assign it to a variable, then call it
const unregister = zfetchzInterceptor; ;
4.Fetch data
z