Storage
chrome.storage Promise interface.
Test:
Static Method Summary
Static Public Methods | ||
public static |
Clear all values in local storage. |
|
public static |
Get multiple values from local storage. |
|
public static |
localGetValue(key: string): Promise<any> Get single value from local storage. |
|
public static |
localRemove(keys: string): Promise Remove multiple values from local storage. |
|
public static |
Set multiple values into local storage. |
|
public static |
localSetValue(key: string, value: any): Promise Set single value into local storage. |
|
public static |
Clear all values in sync storage. |
|
public static |
Get multiple values from sync storage. |
|
public static |
syncGetValue(key: string): Promise<any> Get single value from sync storage. |
|
public static |
syncRemove(keys: string[] | string): Promise Remove multiple values from sync storage. |
|
public static |
Set multiple values into sync storage. |
|
public static |
syncSetValue(key: string, value: any): Promise Set single value into sync storage. |
Static Public Methods
public static localGet(keys: string[] | string): Promise<Object<string, any>> source
Get multiple values from local storage.
Test:
public static localGetValue(key: string): Promise<any> source
Get single value from local storage.
Params:
Name | Type | Attribute | Description |
key | string | Key in storage. |
Test:
public static localRemove(keys: string): Promise source
Remove multiple values from local storage.
Params:
Name | Type | Attribute | Description |
keys | string | Removed keys. |
Test:
public static localSet(items: Object<string, any>): Promise source
Set multiple values into local storage.
Test:
public static localSetValue(key: string, value: any): Promise source
Set single value into local storage.
Params:
Name | Type | Attribute | Description |
key | string | Key for saved value. |
|
value | any | Saved value. |
Test:
public static syncGet(keys: string[] | string): Promise<Object<string, any>> source
Get multiple values from sync storage.
Test:
public static syncGetValue(key: string): Promise<any> source
Get single value from sync storage.
Params:
Name | Type | Attribute | Description |
key | string | Key in storage. |
Test:
public static syncRemove(keys: string[] | string): Promise source
Remove multiple values from sync storage.