Skip to content

Latest commit

 

History

History
324 lines (200 loc) · 6.67 KB

modules.md

File metadata and controls

324 lines (200 loc) · 6.67 KB

@hotsuitor/akutil - v0.0.2 / Exports

@hotsuitor/akutil - v0.0.2

Table of contents

References

Modules

Classes

Variables

Functions

References

downloadFile

Renames and re-exports __type


downloadImage

Renames and re-exports __type


extend

Renames and re-exports __type


extendDate

Renames and re-exports __type


formatDate

Renames and re-exports __type


isDef

Renames and re-exports __type


isNil

Renames and re-exports __type


isNull

Renames and re-exports __type


isObject

Renames and re-exports __type


isPlainObject

Renames and re-exports __type


isUnDef

Renames and re-exports __type


safeGetter

Renames and re-exports __type


safeSetter

Renames and re-exports __type

Variables

default

default: Object

Type declaration

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

Defined in

src/akutil.ts:62

Functions

debounce

debounce(fn, ms?): (this: any, ...args: any[]) => void

函数防抖

Parameters

Name Type Default value
fn Function undefined
ms number 300

Returns

fn

▸ (this, ...args): void

Parameters
Name Type
this any
...args any[]
Returns

void

Defined in

src/debounce.ts:7


downloadFileWithBlob

downloadFileWithBlob(downloadAjax): Promise<any>

读取文件流,下载文件

Parameters

Name Type
downloadAjax any

Returns

Promise<any>

下载完文件的promise

Defined in

src/file/file.ts:8

downloadFileWithBlob(downloadAjax, params): Promise<any>

Parameters

Name Type
downloadAjax any
params any

Returns

Promise<any>

Defined in

src/file/file.ts:9

downloadFileWithBlob(downloadAjax, params, filename): Promise<any>

Parameters

Name Type
downloadAjax any
params any
filename string

Returns

Promise<any>

Defined in

src/file/file.ts:10


isPromise

isPromise(v): boolean

是否 promise 类型

Parameters

Name Type
v any

Returns

boolean

Defined in

src/isPromise.ts:6


throttle

throttle(fn, wait?, immediate?): (this: any) => void

节流函数

Parameters

Name Type Default value Description
fn Function undefined
wait number 300
immediate boolean false 是否立即触发函数

Returns

fn

Function

▸ (this): void

Parameters
Name Type
this any
Returns

void

Defined in

src/throttle.ts:8