@ribbon-studios/js-utils 2.1.0 → 2.1.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
@@ -104,6 +104,7 @@ async function rfetch(url, { params, body, ...options } = {}) {
104
104
  );
105
105
  const content = ((_b = (_a = response.headers.get("Content-Type")) == null ? void 0 : _a.toLowerCase()) == null ? void 0 : _b.includes("json")) ? await response.json() : await response.text();
106
106
  if (response.ok) {
107
+ if (response.status === 204) return void 0;
107
108
  return content;
108
109
  }
109
110
  return Promise.reject(
package/dist/index.js CHANGED
@@ -102,6 +102,7 @@ async function rfetch(url, { params, body, ...options } = {}) {
102
102
  );
103
103
  const content = ((_b = (_a = response.headers.get("Content-Type")) == null ? void 0 : _a.toLowerCase()) == null ? void 0 : _b.includes("json")) ? await response.json() : await response.text();
104
104
  if (response.ok) {
105
+ if (response.status === 204) return void 0;
105
106
  return content;
106
107
  }
107
108
  return Promise.reject(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ribbon-studios/js-utils",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Collection of generic javascript utilities curated by the Rainbow Cafe~",
5
5
  "type": "module",
6
6
  "source": "src/*.ts",