0.5.5 • Published 10 months ago
Last release10 months ago
aigens-sdk-preferences
Aigens SDK Preferences
Install
npm install @aigens/aigens-sdk-preferences
npx cap sync
API
get(...)
get(options: GetOptions) => Promise<GetResult>
Param | Type |
---|
options | GetOptions |
Returns: Promise<GetResult>
set(...)
set(options: SetOptions) => Promise<void>
Param | Type |
---|
options | SetOptions |
remove(...)
remove(options: RemoveOptions) => Promise<void>
Param | Type |
---|
options | RemoveOptions |
clear()
clear() => Promise<void>
saveImmediately()
saveImmediately() => Promise<void>
setIsAutoSaveNormal(...)
setIsAutoSaveNormal(options: { isAutoSave: boolean; }) => Promise<void>
Param | Type |
---|
options | { isAutoSave: boolean; } |
setIsAutoSaveMember(...)
setIsAutoSaveMember(options: { isAutoSave: boolean; }) => Promise<void>
Param | Type |
---|
options | { isAutoSave: boolean; } |
enableUserDefault(...)
enableUserDefault(options: { enable: boolean; }) => Promise<void>
Param | Type |
---|
options | { enable: boolean; } |
keys()
keys() => Promise<KeysResult>
Returns: Promise<KeysResult>
log(...)
log(options: { log: string; logDirName?: string; toTop?: boolean; }) => Promise<{ result: number; message?: string; }>
Param | Type |
---|
options | { log: string; logDirName?: string; toTop?: boolean; } |
Returns: Promise<{ result: number; message?: string; }>
deleteLog(...)
deleteLog(options?: { keepMonths?: number | undefined; logDirName?: string | undefined; } | undefined) => Promise<void>
Param | Type |
---|
options | { keepMonths?: number; logDirName?: string; } |
Interfaces
GetResult
Prop | Type | Description | Since |
---|
value | string | null | The value from preferences associated with the given key. If a value was not previously set or was removed, value will be null . | 1.0.0 |
GetOptions
Prop | Type | Description | Since |
---|
key | string | The key whose value to retrieve from preferences. | 1.0.0 |
SetOptions
Prop | Type | Description | Since |
---|
key | string | The key to associate with the value being set in preferences. | 1.0.0 |
value | string | The value to set in preferences with the associated key. | 1.0.0 |
RemoveOptions
Prop | Type | Description | Since |
---|
key | string | The key whose value to remove from preferences. | 1.0.0 |
KeysResult
Prop | Type | Description | Since |
---|
keys | string[] | The known keys in preferences. | 1.0.0 |