ddan-js 3.6.4 → 3.6.6

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.
@@ -17,6 +17,7 @@ declare const _default: {
17
17
  uuid: (len?: number, radix?: number) => string;
18
18
  guid: (len?: number, prefix?: boolean, sep?: string) => string;
19
19
  UUID: (mode?: "lower" | "upper", radix?: number) => string;
20
+ uuid32: (radix?: number) => string;
20
21
  randomID: (len?: number, mode?: "lower" | "upper" | "mixin", radix?: number) => string;
21
22
  getHexString: (len: number) => string;
22
23
  keyNumber: string;
@@ -1,3 +1,25 @@
1
+ declare class Fetch {
2
+ baseURL: string;
3
+ defaultHeaders: Record<string, string>;
4
+ constructor(config?: {
5
+ baseURL?: string;
6
+ headers?: Record<string, string>;
7
+ });
8
+ query(options: {
9
+ url: string;
10
+ method?: string;
11
+ headers?: Record<string, any>;
12
+ cache?: RequestCache;
13
+ }, params?: object): Promise<string>;
14
+ request(url: string, args?: {
15
+ params?: Record<string, any>;
16
+ method?: 'POST' | 'GET';
17
+ baseURL?: string;
18
+ headers?: Record<string, string>;
19
+ cache?: RequestCache;
20
+ }): Promise<string>;
21
+ formatError(response: Response | null, responseText: string | null, networkError?: any): any;
22
+ }
1
23
  declare const _default: {
2
24
  getDataURL: (url: string, cache?: RequestCache | undefined) => Promise<[null, {
3
25
  contentType: string;
@@ -12,5 +34,6 @@ declare const _default: {
12
34
  }) => Promise<Uint8Array | undefined>;
13
35
  getText: (url: string, cache?: RequestCache | undefined) => Promise<[any, undefined] | [null, string]>;
14
36
  cache: (url: string, cache?: RequestCache) => Promise<[any, undefined] | [null, boolean]>;
37
+ Fetch: typeof Fetch;
15
38
  };
16
39
  export default _default;
@@ -167,6 +167,7 @@ declare const dHook: {
167
167
  uuid: (len?: number, radix?: number) => string;
168
168
  guid: (len?: number, prefix?: boolean, sep?: string) => string;
169
169
  UUID: (mode?: "lower" | "upper", radix?: number) => string;
170
+ uuid32: (radix?: number) => string;
170
171
  randomID: (len?: number, mode?: "lower" | "upper" | "mixin", radix?: number) => string;
171
172
  getHexString: (len: number) => string;
172
173
  keyNumber: string;
@@ -85,6 +85,7 @@ declare const dUtil: {
85
85
  uuid: (len?: number, radix?: number) => string;
86
86
  guid: (len?: number, prefix?: boolean, sep?: string) => string;
87
87
  UUID: (mode?: "lower" | "upper", radix?: number) => string;
88
+ uuid32: (radix?: number) => string;
88
89
  randomID: (len?: number, mode?: "lower" | "upper" | "mixin", radix?: number) => string;
89
90
  getHexString: (len: number) => string;
90
91
  keyNumber: string;
package/bin/tiny/web.d.ts CHANGED
@@ -15,6 +15,29 @@ declare const dWeb: {
15
15
  }) => Promise<Uint8Array | undefined>;
16
16
  getText: (url: string, cache?: RequestCache | undefined) => Promise<[any, undefined] | [null, string]>;
17
17
  cache: (url: string, cache?: RequestCache) => Promise<[any, undefined] | [null, boolean]>;
18
+ Fetch: {
19
+ new (config?: {
20
+ baseURL?: string | undefined;
21
+ headers?: Record<string, string> | undefined;
22
+ }): {
23
+ baseURL: string;
24
+ defaultHeaders: Record<string, string>;
25
+ query(options: {
26
+ url: string;
27
+ method?: string | undefined;
28
+ headers?: Record<string, any> | undefined;
29
+ cache?: RequestCache | undefined;
30
+ }, params?: object): Promise<string>;
31
+ request(url: string, args?: {
32
+ params?: Record<string, any> | undefined;
33
+ method?: "POST" | "GET" | undefined;
34
+ baseURL?: string | undefined;
35
+ headers?: Record<string, string> | undefined;
36
+ cache?: RequestCache | undefined;
37
+ }): Promise<string>;
38
+ formatError(response: Response | null, responseText: string | null, networkError?: any): any;
39
+ };
40
+ };
18
41
  };
19
42
  Http: typeof Http;
20
43
  css: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ddan-js",
3
- "version": "3.6.4",
3
+ "version": "3.6.6",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "ddan-js",