fetch-rewrite
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Rewrite Fetch

This small library will let you apply rewrite rules to fetch commands.

This is useful for "fixing" other people's code (or perhaps for testing). My specific use case was to modify the response payloads for the Spotify app so that I could remove episodes and audiobooks by modifying the fetch responses.

Usage

TODO

  • [x] Method matching
  • [x] Deeper URL matching (i.e. on origin too)
  • [x] Pattern match/regex support on URL match
  • [x] Tests
  • [ ] Actually include more documentation and examples

Package Sidebar

Install

npm i fetch-rewrite

Weekly Downloads

8

Version

1.2.0

License

MIT

Unpacked Size

8.87 kB

Total Files

8

Last publish

Collaborators

  • remy