Function
| Static Public Summary | ||
| public |
async getCache(): * Get the configured Cache implementation |
|
| public |
parseConfig(options: object): object Combine given options with environment variables |
|
| public |
reusePromise(self: *, fn: function, args: ...any): Promise Reuse a function until it resolves |
|
| public |
reusePromiseForever(self: *, fn: function, args: ...any): Promise Reuse a function, returning it's result forever |
|
Static Public
public async getCache(): * source
import {getCache} from '@alexvv13/tpapi/lib/cache.js'Get the configured Cache implementation
Return:
| * |
public parseConfig(options: object): object source
import {parseConfig} from '@alexvv13/tpapi/lib/configBase.js'Combine given options with environment variables
Params:
| Name | Type | Attribute | Description |
| options | object | Incoming options |
public reusePromise(self: *, fn: function, args: ...any): Promise source
import {reusePromise} from '@alexvv13/tpapi/lib/reusePromises.js'Reuse a function until it resolves
Params:
| Name | Type | Attribute | Description |
| self | * | ||
| fn | function | ||
| args | ...any | Arguments to pass to the function |
public reusePromiseForever(self: *, fn: function, args: ...any): Promise source
import {reusePromiseForever} from '@alexvv13/tpapi/lib/reusePromises.js'Reuse a function, returning it's result forever
Params:
| Name | Type | Attribute | Description |
| self | * | ||
| fn | function | ||
| args | ...any | Arguments to pass to the function |
