utils-lib-js 2.3.2 → 2.3.3

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.
@@ -10,6 +10,7 @@ export declare enum types {
10
10
  "[object RegExp]" = "regExp",
11
11
  "[object Math]" = "math"
12
12
  }
13
+ export type GetTypesReturn = "array" | "object" | "function" | "set" | "map" | "weakMap" | "weakSet" | "date" | "regExp" | "math" | "string" | "number" | "boolean" | "symbol" | "bigint" | "undefined" | "null";
13
14
  declare const _default: {
14
15
  types: typeof types;
15
16
  };
@@ -1,3 +1,4 @@
1
+ import { GetTypesReturn } from "./static";
1
2
  export type IKey = string | symbol | number;
2
3
  export type IObject<V = any, K extends string | number | symbol = IKey> = Record<K, V>;
3
4
  export interface IPromise<T = any> {
@@ -12,7 +13,7 @@ export type IDemoteArray<T> = Array<IDemoteArray<T> | T>;
12
13
  export type IRandomNum = (min: number, max: number, bool?: boolean) => number;
13
14
  export type IUrlSplit = (url: string) => IObject<any>;
14
15
  export type IUrlJoin = (url: string, query: IObject) => string;
15
- export type IGetType<T> = (data: any) => typeof data | T[keyof T] | "null";
16
+ export type IGetType = (data: any) => GetTypesReturn;
16
17
  export type IGetTypeByList = (data: any, whiteList: string[]) => boolean;
17
18
  export type IGetValue = <T, U = IObject<T> | IObject<T>[IKey]>(object: U, key: string, defaultValue?: any) => U;
18
19
  export type ISetValue = <T>(object: IObject<T>, key: string, value?: any) => IObject<T>;
@@ -1,16 +1,15 @@
1
- import { types } from "./static";
2
1
  import { IGetType, IGetTypeByList, IRandomNum, IUrlJoin, IUrlSplit } from "./types";
3
2
  export declare const randomNum: IRandomNum;
4
3
  export declare const urlSplit: IUrlSplit;
5
4
  export declare const urlJoin: IUrlJoin;
6
- export declare const getType: IGetType<types>;
5
+ export declare const getType: IGetType;
7
6
  export declare const getTypeByList: IGetTypeByList;
8
7
  export declare const toKebabCase: (camelCase: string, separator?: string) => string;
9
8
  declare const _default: {
10
9
  randomNum: IRandomNum;
11
10
  urlSplit: IUrlSplit;
12
11
  urlJoin: IUrlJoin;
13
- getType: IGetType<types>;
12
+ getType: IGetType;
14
13
  getTypeByList: IGetTypeByList;
15
14
  toKebabCase: (camelCase: string, separator?: string) => string;
16
15
  };
@@ -9,22 +9,7 @@ export * from "./event";
9
9
  export * from "./storage";
10
10
  export * from "./log";
11
11
  export * from "./animate";
12
- export * from "event-message-center";
13
- export * from "task-queue-lib";
14
- export * from "js-request-lib";
15
- export * from "timer-manager-lib";
16
- export * from "js-log-lib";
17
- import eventMessageCenter from "event-message-center";
18
- import taskQueueLib from "task-queue-lib";
19
- import JSRequest from "js-request-lib";
20
- import TimerManager from "timer-manager-lib";
21
- import JSLogLib from "js-log-lib";
22
12
  declare const _default: {
23
- eventMessageCenter: typeof eventMessageCenter;
24
- taskQueueLib: typeof taskQueueLib;
25
- JSRequest: typeof JSRequest;
26
- TimerManager: typeof TimerManager;
27
- JSLogLib: typeof JSLogLib;
28
13
  AnimateFrame: typeof import("./animate").AnimateFrame;
29
14
  quadraticBezier: typeof import("./animate").quadraticBezier;
30
15
  cubicBezier: typeof import("./animate").cubicBezier;
@@ -54,7 +39,7 @@ declare const _default: {
54
39
  randomNum: import("./types").IRandomNum;
55
40
  urlSplit: import("./types").IUrlSplit;
56
41
  urlJoin: import("./types").IUrlJoin;
57
- getType: import("./types").IGetType<import("./static").types>;
42
+ getType: import("./types").IGetType;
58
43
  getTypeByList: import("./types").IGetTypeByList;
59
44
  toKebabCase: (camelCase: string, separator?: string) => string;
60
45
  getValue: import("./types").IGetValue;