Functions
ArrayBuffer2String
- ArrayBuffer2String(buf: ArrayBuffer): string
-
Parameters
Returns string
ConvertTo
- ConvertTo<T>(val: unknown): T
-
Type parameters
Parameters
Returns T
DoUntilSuccess
- DoUntilSuccess(action: () => boolean, timeout?: number, retryCount?: number, startImmediately?: boolean): Promise<boolean>
-
Parameters
-
action: () => boolean
-
timeout: number = 500
-
retryCount: number = 5
-
startImmediately: boolean = false
Returns Promise<boolean>
GetStringBetween
- GetStringBetween(str: string, strStart: string, strEnd: string, max?: number): string[]
-
Parameters
-
str: string
-
strStart: string
-
strEnd: string
-
max: number = -1
Returns string[]
GetStringPositionBetween
- GetStringPositionBetween(str: string, strStart: string, strEnd: string, max?: number, startIndex?: number): StringPosition[]
-
Parameters
-
str: string
-
strStart: string
-
strEnd: string
-
max: number = -1
-
startIndex: number = 0
GetWeekOfYear
- GetWeekOfYear(date: Date, iso?: boolean): number
-
Parameters
-
date: Date
-
Optional iso: boolean
Returns number
IncreaseVersion
- IncreaseVersion(version: string): string
- IncreaseVersion(version: string, index: number, increment: number): string
-
Parameters
Returns string
-
Parameters
-
version: string
-
index: number
-
increment: number
Returns string
IsHttpsUrl
- IsHttpsUrl(url: string): undefined | boolean
-
Parameters
Returns undefined | boolean
IsStartsWithNumber
- IsStartsWithNumber(str: string): boolean
-
Parameters
Returns boolean
RejectAfter
- RejectAfter(timeout: number): Promise<never>
-
Parameters
Returns Promise<never>
ReplaceAllStringBetween
- ReplaceAllStringBetween(replaceMethod: (val: string) => string, str: string, strStart: string, strEnd: string): string
-
Parameters
-
replaceMethod: (val: string) => string
-
-
Parameters
Returns string
-
str: string
-
strStart: string
-
strEnd: string
Returns string
ResolveAfter
- ResolveAfter<T>(data: T, timeout: number): Promise<T>
-
Type parameters
Parameters
Returns Promise<T>
Sleep
- Sleep(time: number): Promise<unknown>
-
Parameters
Returns Promise<unknown>
String2ArrayBuffer
- String2ArrayBuffer(str: string): ArrayBuffer
-
Parameters
Returns ArrayBuffer
TimeoutAfter
- TimeoutAfter<T>(action: Promise<T>, timeout?: number): Promise<T>
-
Type parameters
Parameters
-
action: Promise<T>
-
timeout: number = 500
Returns Promise<T>
2.0.11
2021-02-01