@jeniex/utils 1.0.9 → 1.0.10
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/browser/index.cjs +3 -3
- package/browser/index.d.ts +1 -1
- package/browser/index.js +3 -3
- package/package.json +1 -1
package/browser/index.cjs
CHANGED
|
@@ -127,7 +127,7 @@ async function fishDocument(url, options, x) {
|
|
|
127
127
|
return parser.parseFromString(responseText, 'text/html');
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
async function
|
|
130
|
+
async function fishJSON(url, options, x) {
|
|
131
131
|
const response = await (x ? fishXResponse : fishResponse)(url, options);
|
|
132
132
|
return response.json();
|
|
133
133
|
}
|
|
@@ -142,14 +142,14 @@ const fish = {
|
|
|
142
142
|
blob: async (url, options) => fishBlob(url, options),
|
|
143
143
|
buffer: async (url, options) => fishBuffer(url, options),
|
|
144
144
|
document: async (url, options) => fishDocument(url, options),
|
|
145
|
-
|
|
145
|
+
JSON: async (url, options) => fishJSON(url, options),
|
|
146
146
|
text: async (url, options) => fishText(url, options),
|
|
147
147
|
};
|
|
148
148
|
const fishX = {
|
|
149
149
|
blob: async (url, options) => fishBlob(url, options, true),
|
|
150
150
|
buffer: async (url, options) => fishBuffer(url, options, true),
|
|
151
151
|
document: async (url, options) => fishDocument(url, options, true),
|
|
152
|
-
|
|
152
|
+
JSON: async (url, options) => fishJSON(url, options, true),
|
|
153
153
|
text: async (url, options) => fishText(url, options, true),
|
|
154
154
|
};
|
|
155
155
|
|
package/browser/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ interface Fish<T> {
|
|
|
32
32
|
blob: (url: string, options?: T) => Promise<Blob>;
|
|
33
33
|
buffer: (url: string, options?: T) => Promise<ArrayBuffer>;
|
|
34
34
|
document: (url: string, options?: T) => Promise<Document>;
|
|
35
|
-
|
|
35
|
+
JSON: (url: string, options?: T) => Promise<object>;
|
|
36
36
|
text: (url: string, options?: T) => Promise<string>;
|
|
37
37
|
}
|
|
38
38
|
|
package/browser/index.js
CHANGED
|
@@ -125,7 +125,7 @@ async function fishDocument(url, options, x) {
|
|
|
125
125
|
return parser.parseFromString(responseText, 'text/html');
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
async function
|
|
128
|
+
async function fishJSON(url, options, x) {
|
|
129
129
|
const response = await (x ? fishXResponse : fishResponse)(url, options);
|
|
130
130
|
return response.json();
|
|
131
131
|
}
|
|
@@ -140,14 +140,14 @@ const fish = {
|
|
|
140
140
|
blob: async (url, options) => fishBlob(url, options),
|
|
141
141
|
buffer: async (url, options) => fishBuffer(url, options),
|
|
142
142
|
document: async (url, options) => fishDocument(url, options),
|
|
143
|
-
|
|
143
|
+
JSON: async (url, options) => fishJSON(url, options),
|
|
144
144
|
text: async (url, options) => fishText(url, options),
|
|
145
145
|
};
|
|
146
146
|
const fishX = {
|
|
147
147
|
blob: async (url, options) => fishBlob(url, options, true),
|
|
148
148
|
buffer: async (url, options) => fishBuffer(url, options, true),
|
|
149
149
|
document: async (url, options) => fishDocument(url, options, true),
|
|
150
|
-
|
|
150
|
+
JSON: async (url, options) => fishJSON(url, options, true),
|
|
151
151
|
text: async (url, options) => fishText(url, options, true),
|
|
152
152
|
};
|
|
153
153
|
|