config Api
Description
The config
method is used to configure the storage. This method should be called before Data-Related API:
Usage
ts
import storeage, { INTERNAL_DRIVERS } from 'storeage';
storeage.config({ driver: [INTERNAL_DRIVERS.LOCALSTORAGE] });
Parameters
- options:
{ name?: string, storeName?: string, driver?: string[], expirationTime?: number }
(optional)- name:
string
(optional)The name of the storage.
- storeName:
string
(optional)The name of the store.
- driver:
string[]
(optional)The drivers to use.
- expirationTime:
number
(optional)The expiration time of the storage.
- name:
The options to configure the storage.
Returns
void