@ribbon-studios/js-utils 1.6.0 → 1.6.1

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.
package/dist/index.cjs CHANGED
@@ -82,17 +82,20 @@ async function rfetch(url, { params, body, ...options } = {}) {
82
82
  if (body instanceof FormData) {
83
83
  requestInit.body = body;
84
84
  requestInit.headers = {
85
- "Content-Type": "application/x-www-form-urlencoded"
85
+ "Content-Type": "application/x-www-form-urlencoded",
86
+ ...requestInit.headers
86
87
  };
87
88
  } else if (typeof body === "string") {
88
89
  requestInit.body = body;
89
90
  requestInit.headers = {
90
- "Content-Type": "application/json"
91
+ "Content-Type": "application/json",
92
+ ...requestInit.headers
91
93
  };
92
94
  } else {
93
95
  requestInit.body = JSON.stringify(body);
94
96
  requestInit.headers = {
95
- "Content-Type": "application/json"
97
+ "Content-Type": "application/json",
98
+ ...requestInit.headers
96
99
  };
97
100
  }
98
101
  }
package/dist/index.js CHANGED
@@ -80,17 +80,20 @@ async function rfetch(url, { params, body, ...options } = {}) {
80
80
  if (body instanceof FormData) {
81
81
  requestInit.body = body;
82
82
  requestInit.headers = {
83
- "Content-Type": "application/x-www-form-urlencoded"
83
+ "Content-Type": "application/x-www-form-urlencoded",
84
+ ...requestInit.headers
84
85
  };
85
86
  } else if (typeof body === "string") {
86
87
  requestInit.body = body;
87
88
  requestInit.headers = {
88
- "Content-Type": "application/json"
89
+ "Content-Type": "application/json",
90
+ ...requestInit.headers
89
91
  };
90
92
  } else {
91
93
  requestInit.body = JSON.stringify(body);
92
94
  requestInit.headers = {
93
- "Content-Type": "application/json"
95
+ "Content-Type": "application/json",
96
+ ...requestInit.headers
94
97
  };
95
98
  }
96
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ribbon-studios/js-utils",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Collection of generic javascript utilities curated by the Rainbow Cafe~",
5
5
  "type": "module",
6
6
  "source": "src/*.ts",