@whatwg-node/node-fetch 0.0.6-alpha-20230207093208-c16434f → 0.0.6-alpha-20230207100807-5eb50c6

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 +3 -4
  2. package/index.mjs +3 -4
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -741,10 +741,9 @@ class PonyfillHeaders {
741
741
  }
742
742
  append(name, value) {
743
743
  const key = name.toLowerCase();
744
- if (this.map.has(key)) {
745
- value = this.map.get(key) + ', ' + value;
746
- }
747
- this.map.set(key, value);
744
+ const existingValue = this.map.get(key);
745
+ const finalValue = existingValue ? `${existingValue}, ${value}` : value;
746
+ this.map.set(key, finalValue);
748
747
  }
749
748
  get(name) {
750
749
  const key = name.toLowerCase();
package/index.mjs CHANGED
@@ -735,10 +735,9 @@ class PonyfillHeaders {
735
735
  }
736
736
  append(name, value) {
737
737
  const key = name.toLowerCase();
738
- if (this.map.has(key)) {
739
- value = this.map.get(key) + ', ' + value;
740
- }
741
- this.map.set(key, value);
738
+ const existingValue = this.map.get(key);
739
+ const finalValue = existingValue ? `${existingValue}, ${value}` : value;
740
+ this.map.set(key, finalValue);
742
741
  }
743
742
  get(name) {
744
743
  const key = name.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whatwg-node/node-fetch",
3
- "version": "0.0.6-alpha-20230207093208-c16434f",
3
+ "version": "0.0.6-alpha-20230207100807-5eb50c6",
4
4
  "description": "Fetch API implementation for Node",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {