opiece-utils
v0.0.8
Published
some common methods.
Downloads
4
Readme
opiece-utils
some common methods
Install
$ npm install opiece-utils --save
Usage
// import xyz from opiece-utils/lib/xyz
// list2tree
import list2tree from 'opiece-utils/lib/list2tree'
// request
import request from 'opiece-utils/lib/request'
example
import request from 'opiece-utils/lib/request'
request(`${url}`, {
body: {
...
},
interceptors: {
request: [interceptor, ...],
response: [interceptor, ...]
}
}).then(data => {
console.log(data)
}).catch(err => {
console.error(err)
})