unfetch
unfetch copied to clipboard
Reuse header variable
Shave off one more byte from plain js, and two from the polyfill. Unfortunately adds one byte to the umd build.
Before:
Build "unfetch" to dist:
496 B: unfetch.js
496 B: unfetch.mjs
566 B: unfetch.umd.js
Build "unfetch" to polyfill:
498 B: index.js
After:
Build "unfetch" to dist:
495 B: unfetch.js
496 B: unfetch.mjs
567 B: unfetch.umd.js
Build "unfetch" to polyfill:
496 B: index.js
Nice find! This might not work when we move Response and Headers into their own constructors though.