Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-interceptor
Interceptor for next.
https://github.com/afeiship/next-interceptor
compose interceptor next pipe pipeline priority promise
Last synced: 20 days ago
JSON representation
Interceptor for next.
- Host: GitHub
- URL: https://github.com/afeiship/next-interceptor
- Owner: afeiship
- License: mit
- Created: 2021-04-24T16:23:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T01:14:22.000Z (2 months ago)
- Last Synced: 2024-10-06T22:25:38.351Z (about 1 month ago)
- Topics: compose, interceptor, next, pipe, pipeline, priority, promise
- Language: JavaScript
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-interceptor
> Interceptor for next.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-interceptor
```## usage
```js
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](https://github.com/afeiship/next-interceptor/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-interceptor
[version-url]: https://npmjs.org/package/@jswork/next-interceptor[license-image]: https://img.shields.io/npm/l/@jswork/next-interceptor
[license-url]: https://github.com/afeiship/next-interceptor/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-interceptor
[size-url]: https://github.com/afeiship/next-interceptor/blob/master/dist/next-interceptor.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-interceptor
[download-url]: https://www.npmjs.com/package/@jswork/next-interceptor