{"library":"fetch-intercept","type":"library","category":null,"description":"A lightweight library to intercept and modify fetch requests and responses, inspired by Angular HTTP interceptors. Version 2.4.0 is the latest stable release, with infrequent updates. It monkey-patches the global fetch function to allow addition of request/response interceptors in browser, Node, and WebWorker environments. Unlike other interceptors, it uses a simple register/unregister pattern and supports TypeScript definitions, making it easy to add logging, authentication headers, or error handling without modifying fetch calls directly. It requires fetch to be available (polyfill suggested for older environments).","language":"javascript","status":"active","version":"2.4.0","tags":["javascript","fetch","request","intercept","interceptor","hooks","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fetch-intercept","imports":["import fetchIntercept from 'fetch-intercept';","import fetchIntercept from 'fetch-intercept';\nconst unregister = fetchIntercept.register({...});","import fetchIntercept from 'fetch-intercept';\nconst unregister = fetchIntercept.register({...});\nunregister();"]},{"cmd":"yarn add fetch-intercept","imports":[]},{"cmd":"pnpm add fetch-intercept","imports":[]}],"homepage":null,"github":"https://github.com/werk85/fetch-intercept","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fetch-intercept","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/fetch-intercept/compatibility"}}