@ahoo-wang/fetcher 0.6.8 → 0.8.0
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/fetchInterceptor.d.ts +59 -0
- package/dist/fetchInterceptor.d.ts.map +1 -0
- package/dist/fetcher.d.ts +0 -12
- package/dist/fetcher.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +252 -145
- package/dist/index.umd.js +1 -1
- package/dist/interceptor.d.ts +235 -20
- package/dist/interceptor.d.ts.map +1 -1
- package/dist/orderedCapable.d.ts +21 -16
- package/dist/orderedCapable.d.ts.map +1 -1
- package/dist/requestBodyInterceptor.d.ts +41 -8
- package/dist/requestBodyInterceptor.d.ts.map +1 -1
- package/dist/timeout.d.ts +80 -12
- package/dist/timeout.d.ts.map +1 -1
- package/dist/urlBuilder.d.ts +40 -15
- package/dist/urlBuilder.d.ts.map +1 -1
- package/dist/urls.d.ts +25 -7
- package/dist/urls.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/urls.d.ts
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Checks if the given URL is an absolute URL
|
|
3
3
|
*
|
|
4
|
-
* @param url -
|
|
5
|
-
* @returns boolean -
|
|
4
|
+
* @param url - URL string to check
|
|
5
|
+
* @returns boolean - Returns true if it's an absolute URL, false otherwise
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* isAbsoluteURL('https://api.example.com/users'); // true
|
|
10
|
+
* isAbsoluteURL('/users'); // false
|
|
11
|
+
* isAbsoluteURL('users'); // false
|
|
12
|
+
* ```
|
|
6
13
|
*/
|
|
7
14
|
export declare function isAbsoluteURL(url: string): boolean;
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
16
|
+
* Combines a base URL and a relative URL into a complete URL
|
|
17
|
+
*
|
|
18
|
+
* @param baseURL - Base URL
|
|
19
|
+
* @param relativeURL - Relative URL
|
|
20
|
+
* @returns string - Combined complete URL
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* If the relative URL is already an absolute URL, it will be returned as-is.
|
|
24
|
+
* Otherwise, the base URL and relative URL will be combined with proper path separator handling.
|
|
10
25
|
*
|
|
11
|
-
* @
|
|
12
|
-
*
|
|
13
|
-
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* combineURLs('https://api.example.com', '/users'); // https://api.example.com/users
|
|
29
|
+
* combineURLs('https://api.example.com/', 'users'); // https://api.example.com/users
|
|
30
|
+
* combineURLs('https://api.example.com', 'https://other.com/users'); // https://other.com/users
|
|
31
|
+
* ```
|
|
14
32
|
*/
|
|
15
33
|
export declare function combineURLs(baseURL: string, relativeURL: string): string;
|
|
16
34
|
//# sourceMappingURL=urls.d.ts.map
|
package/dist/urls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAaA
|
|
1
|
+
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../src/urls.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,WAExC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,UAQ/D"}
|