@whatwg-node/node-fetch 0.0.6-alpha-20230207100807-5eb50c6 → 0.0.6-alpha-20230207114030-349e836

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +6 -5
  2. package/index.mjs +6 -5
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -729,11 +729,12 @@ class PonyfillHeaders {
729
729
  });
730
730
  }
731
731
  else {
732
- for (const key in headersInit) {
733
- const value = headersInit[key];
734
- if (value != null) {
735
- const normalizedValue = Array.isArray(value) ? value.join(', ') : value;
736
- this.map.set(key, normalizedValue);
732
+ for (const initKey in headersInit) {
733
+ const initValue = headersInit[initKey];
734
+ if (initValue != null) {
735
+ const normalizedValue = Array.isArray(initValue) ? initValue.join(', ') : initValue;
736
+ const normalizedKey = initKey.toLowerCase();
737
+ this.map.set(normalizedKey, normalizedValue);
737
738
  }
738
739
  }
739
740
  }
package/index.mjs CHANGED
@@ -723,11 +723,12 @@ class PonyfillHeaders {
723
723
  });
724
724
  }
725
725
  else {
726
- for (const key in headersInit) {
727
- const value = headersInit[key];
728
- if (value != null) {
729
- const normalizedValue = Array.isArray(value) ? value.join(', ') : value;
730
- this.map.set(key, normalizedValue);
726
+ for (const initKey in headersInit) {
727
+ const initValue = headersInit[initKey];
728
+ if (initValue != null) {
729
+ const normalizedValue = Array.isArray(initValue) ? initValue.join(', ') : initValue;
730
+ const normalizedKey = initKey.toLowerCase();
731
+ this.map.set(normalizedKey, normalizedValue);
731
732
  }
732
733
  }
733
734
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.0.6-alpha-20230207100807-5eb50c6",
3
+ "version": "0.0.6-alpha-20230207114030-349e836",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {