utils-lib-js 1.7.10 → 1.7.13

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.
@@ -12,6 +12,7 @@ export declare const getInstance: IGetInstance;
12
12
  export declare const classDecorator: IClassDecorator;
13
13
  export declare const stringToJson: IStringToJson;
14
14
  export declare const jsonToString: IJsonToString;
15
+ export declare const isWindow: (win: any) => boolean;
15
16
  declare const _default: {
16
17
  getValue: IGetValue;
17
18
  setValue: ISetValue;
@@ -26,5 +27,6 @@ declare const _default: {
26
27
  classDecorator: IClassDecorator;
27
28
  stringToJson: IStringToJson;
28
29
  jsonToString: IJsonToString;
30
+ isWindow: (win: any) => boolean;
29
31
  };
30
32
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { IRequest, IRequestBase, IRequestInit, IInterceptors, IUrl, IObject, IRequestBody, IRequestOptions, IRequestBaseFn, IEnv } from "./index";
2
- import CustomAbortController from "abort-controller";
3
2
  declare class Interceptors implements IInterceptors {
4
3
  private requestSuccess;
5
4
  private responseSuccess;
@@ -36,7 +35,7 @@ declare abstract class RequestInit extends RequestBase implements IRequestInit {
36
35
  headers?: {};
37
36
  body?: any;
38
37
  timeout?: number;
39
- controller?: CustomAbortController;
38
+ controller?: any;
40
39
  type?: string;
41
40
  }) => IRequestOptions;
42
41
  initFetchParams: (url: IUrl, opts: IRequestOptions) => any;
@@ -31,7 +31,7 @@ export type IStringToJson = (target: string) => IObject<any> | null;
31
31
  export type IJsonToString = (target: IObject<any>) => string;
32
32
  export type IThrottle = (fn: Function, time: number) => (...args: any[]) => void;
33
33
  export type IDebounce = (fn: Function, time: number) => (...args: any[]) => void;
34
- export type IDefer = () => IPromise;
34
+ export type IDefer = (timer?: number) => IPromise;
35
35
  export type ICatchAwait<T extends Promise<any>> = (defer: T) => T;
36
36
  export type IArrayRandom<T extends any[]> = (arr: T) => T;
37
37
  export type IArrayUniq<T extends any[]> = (arr: T) => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utils-lib-js",
3
- "version": "1.7.10",
3
+ "version": "1.7.13",
4
4
  "description": "JavaScript工具函数,封装的一些常用的js函数",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
package/pnpm-lock.yaml CHANGED
@@ -1,4 +1,4 @@
1
- lockfileVersion: 5.4
1
+ lockfileVersion: 5.3
2
2
 
3
3
  specifiers:
4
4
  '@rollup/plugin-alias': ^4.0.3
@@ -21,7 +21,7 @@ dependencies:
21
21
  devDependencies:
22
22
  '@rollup/plugin-alias': 4.0.3_rollup@3.20.2
23
23
  '@rollup/plugin-node-resolve': 15.0.1_rollup@3.20.2
24
- '@rollup/plugin-typescript': 11.0.0_7vpd2ef7tj23jy6lp4gd574lwm
24
+ '@rollup/plugin-typescript': 11.0.0_fd5e3d10bf9a75b4e3cb7f0c3eff8bb3
25
25
  '@types/node': 18.11.9
26
26
  rollup: 3.20.2
27
27
  rollup-plugin-terser: 7.0.2_rollup@3.20.2
@@ -119,7 +119,7 @@ packages:
119
119
  rollup: 3.20.2
120
120
  dev: true
121
121
 
122
- /@rollup/plugin-typescript/11.0.0_7vpd2ef7tj23jy6lp4gd574lwm:
122
+ /@rollup/plugin-typescript/11.0.0_fd5e3d10bf9a75b4e3cb7f0c3eff8bb3:
123
123
  resolution: {integrity: sha512-goPyCWBiimk1iJgSTgsehFD5OOFHiAknrRJjqFCudcW8JtWiBlK284Xnn4flqMqg6YAjVG/EE+3aVzrL5qNSzQ==}
124
124
  engines: {node: '>=14.0.0'}
125
125
  peerDependencies: