Accessors
Static SHA3
-
Methods
Static GenerateYearMonthId
- GenerateYearMonthId(randomLength?: number, validFunc?: (id: string) => boolean, ignoreIDs?: string[], candidatesGUID?: string): string
-
Parameters
-
randomLength: number = 4
-
Optional validFunc: (id: string) => boolean
-
-
Parameters
Returns boolean
-
Optional ignoreIDs: string[]
-
Optional candidatesGUID: string
Returns string
Static GenerateYearMonthIdAsync
- GenerateYearMonthIdAsync(randomLength?: number, validFunc?: (id: string) => Promise<boolean>, ignoreIDs?: string[], candidatesGUID?: string): Promise<string>
-
Parameters
-
randomLength: number = 4
-
Optional validFunc: (id: string) => Promise<boolean>
-
- (id: string): Promise<boolean>
-
Parameters
Returns Promise<boolean>
-
Optional ignoreIDs: string[]
-
Optional candidatesGUID: string
Returns Promise<string>
Static GetCache
- GetCache<T>(name: string): undefined | T
-
Type parameters
Parameters
Returns undefined | T
Static GetValue
- GetValue<T>(name: string, defaultValueIfNotExist?: T): undefined | T
-
Type parameters
Parameters
-
name: string
-
Optional defaultValueIfNotExist: T
Returns undefined | T
Static RemoveCache
- RemoveCache(name?: string, removeExpired?: boolean): void
-
Parameters
-
Optional name: string
-
removeExpired: boolean = true
Returns void
Static RemoveValue
- RemoveValue(name: string): void
-
Parameters
Returns void
Static SetCacheWithDate
- SetCacheWithDate(name: string, value: any, absoluteExpiration: Date): void
-
Parameters
-
name: string
-
value: any
-
absoluteExpiration: Date
Returns void
Static SetCacheWithHour
- SetCacheWithHour(name: string, value: any, hour: number): void
-
Parameters
-
name: string
-
value: any
-
hour: number
Returns void
Static SetCacheWithMilliseconds
- SetCacheWithMilliseconds(name: string, value: any, millisecond: number): void
-
Parameters
-
name: string
-
value: any
-
millisecond: number
Returns void
Static SetCacheWithMinute
- SetCacheWithMinute(name: string, value: any, minute: number): void
-
Parameters
-
name: string
-
value: any
-
minute: number
Returns void
Static SetValue
- SetValue(name: string, value: any): void
-
Parameters
Returns void
just for backward-compatible with earlier versions, recommend use GenerateYearMonthIdAsync instead
1.0.1
2021-12-07