@jeniex/utils 1.0.8 → 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 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 fishJson(url, options, x) {
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
- json: async (url, options) => fishJson(url, options),
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
- json: async (url, options) => fishJson(url, options, true),
152
+ JSON: async (url, options) => fishJSON(url, options, true),
153
153
  text: async (url, options) => fishText(url, options, true),
154
154
  };
155
155
 
@@ -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
- json: (url: string, options?: T) => Promise<object>;
35
+ JSON: (url: string, options?: T) => Promise<object>;
36
36
  text: (url: string, options?: T) => Promise<string>;
37
37
  }
38
38
 
@@ -78,7 +78,7 @@ declare function imageLoad(img: HTMLImageElement): Promise<void>;
78
78
  * Waits for the page to load.
79
79
  * @param completely Whether or not to wait for resources to load as well.
80
80
  */
81
- declare function pageLoad(completely: boolean): Promise<void>;
81
+ declare function pageLoad(completely?: boolean): Promise<void>;
82
82
 
83
83
  interface FlagBase {
84
84
  name: string;
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 fishJson(url, options, x) {
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
- json: async (url, options) => fishJson(url, options),
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
- json: async (url, options) => fishJson(url, options, true),
150
+ JSON: async (url, options) => fishJSON(url, options, true),
151
151
  text: async (url, options) => fishText(url, options, true),
152
152
  };
153
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeniex/utils",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "author": "JenieX",
5
5
  "homepage": "https://github.com/JenieX/utils",
6
6
  "type": "module",