-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
56 lines (38 loc) · 1.21 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
declare namespace hanutil {
/**
* array
*/
export function arrayEqual(arr1: Array<any>, arr2: Array<any>): boolean
export function convertClass(obj: object): Array<any>
export function isArray(obj: object): boolean
/**
* cookie
*/
export function setCookie(name: string, value: string, time?: string): void
export function getCookie(name: string): string
export function removeCookie(name: string): void
/**
* function
*/
export function debounce(func: () => void, delay: number): void
export function throttle(func: () => void, delay: number): void
/**
* object
*/
export function deepAssign(obj1: object, obj2: object): object
export function deepClone(obj: object): object
export function getProperty(obj: object, path: string): object
export function isDef(obj: any): boolean
export function isEmptyObject(obj: any): boolean
/**
* validate
*/
export function isEmail(value: string): boolean
export function isPhoneNum(value: string): boolean
export function isTaxNumber(value: string): boolean
export function isIdCard(value: string): boolean
export function isCarNumber(value: string): boolean
}
declare module 'hanutil' {
export = hanutil
}