@hotsuitor/akutil - v0.0.2 / Exports
- downloadFile
- downloadImage
- extend
- extendDate
- formatDate
- isDef
- isNil
- isNull
- isObject
- isPlainObject
- isUnDef
- safeGetter
- safeSetter
- CycleQueue
- Dictionary
- DoubleEndQueue
- DoublyLinkedList
- HashTable
- LinkedList
- PriorityQueue
- Queue
- Set
- Stack
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
Renames and re-exports __type
• default: Object
Name | Type |
---|---|
CycleQueue |
typeof CycleQueue |
Dictionary |
typeof Dictionary |
DoubleEndQueue |
typeof DoubleEndQueue |
DoublyLinkedList |
typeof DoublyLinkedList |
HashTable |
typeof HashTable |
LinkedList |
typeof LinkedList |
PriorityQueue |
typeof PriorityQueue |
Queue |
typeof Queue |
Set |
typeof Set |
Stack |
typeof Stack |
debounce |
(fn : Function , ms : number ) => (this : any , ...args : any []) => void |
downloadFile |
(url : string ) => void |
downloadFileWithBlob |
(downloadAjax : any ) => Promise <any >(downloadAjax : any , params : any ) => Promise <any >(downloadAjax : any , params : any , filename : string ) => Promise <any > |
downloadImage |
(imgsrc : string , name? : string ) => Promise <void > |
extend |
(this : any , ...args : any []) => object |
extendDate |
() => void |
formatDate |
(date : Date , pattern : string ) => string |
isDef |
(value : any ) => boolean |
isNil |
(value : any ) => boolean |
isNull |
(value : unknown ) => boolean |
isObject |
(value : any ) => boolean |
isPlainObject |
(value : any ) => boolean |
isPromise |
(v : any ) => boolean |
isUnDef |
(value : any ) => boolean |
safeGetter |
(obj : AnyObject , key : string ) => any |
safeSetter |
(obj : AnyObject , key : string , value : any ) => AnyObject |
throttle |
(fn : Function , wait : number , immediate : boolean ) => (this : any ) => void |
▸ debounce(fn
, ms?
): (this
: any
, ...args
: any
[]) => void
函数防抖
Name | Type | Default value |
---|---|---|
fn |
Function |
undefined |
ms |
number |
300 |
fn
▸ (this
, ...args
): void
Name | Type |
---|---|
this |
any |
...args |
any [] |
void
▸ downloadFileWithBlob(downloadAjax
): Promise
<any
>
读取文件流,下载文件
Name | Type |
---|---|
downloadAjax |
any |
Promise
<any
>
下载完文件的promise
▸ downloadFileWithBlob(downloadAjax
, params
): Promise
<any
>
Name | Type |
---|---|
downloadAjax |
any |
params |
any |
Promise
<any
>
▸ downloadFileWithBlob(downloadAjax
, params
, filename
): Promise
<any
>
Name | Type |
---|---|
downloadAjax |
any |
params |
any |
filename |
string |
Promise
<any
>
▸ isPromise(v
): boolean
是否 promise 类型
Name | Type |
---|---|
v |
any |
boolean
▸ throttle(fn
, wait?
, immediate?
): (this
: any
) => void
节流函数
Name | Type | Default value | Description |
---|---|---|---|
fn |
Function |
undefined |
|
wait |
number |
300 |
|
immediate |
boolean |
false |
是否立即触发函数 |
fn
Function
▸ (this
): void
Name | Type |
---|---|
this |
any |
void