@jswork/next-interceptor
v1.1.3
Published
Interceptor for next.
Downloads
285
Maintainers
Readme
next-interceptor
Interceptor for next.
installation
npm install -S @jswork/next-interceptor
usage
import NxInterceptor from '@jswork/next-interceptor';
const intercetor = new NxInterceptor({
async: false,
items:[/* ... your intercetpros ... */]
});
// get response interceptor process data;
const reqData = intercetor.compose(data1, 'request');
const resData = intercetor.compose(data2, 'response');
license
Code released under the MIT license.