
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
interceptor-builder
Advanced tools
A modern collection of reusable utility functions for JavaScript and TypeScript, designed to simplify everyday development tasks.
A clean and extendable interceptor builder for chaining and organizing multiple request/response interceptors.
npm install interceptor-builder
import type { Interceptor, Req, Res, Instance } from "interceptor-builder";
export default class MyInterceptor implements Interceptor {
public instance: Instance;
constructor(instance: Instance) {
this.instance = instance;
}
intercept(req: Req, res: Res): Instance {
req.use(
(config) => config,
(error) => Promise.reject(error)
);
res.use(
(response) => response,
(error) => Promise.reject(error)
);
return this.instance;
}
}
import InterceptorBuilder from "interceptor-builder";
import MyInterceptor from "...";
const axiosInstance = axios.create();
return new InterceptorBuilder(this.instance) //
.use(MyInterceptor)
.build();
This package is open-source and available under the MIT License.
FAQs
A modern collection of reusable utility functions for JavaScript and TypeScript, designed to simplify everyday development tasks.
The npm package interceptor-builder receives a total of 5 weekly downloads. As such, interceptor-builder popularity was classified as not popular.
We found that interceptor-builder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.