ng-storage-local
Version:
An Angular module that makes Web Storage working in the Angular Way
66 lines (65 loc) • 1.72 kB
TypeScript
import { GetStorageConflig, StorageConfig } from './storageModelPermType';
export declare class NgStorage {
/**
@LocalStorage Service
*/
/**
@setLocalStorage
* Set data in local storage
*/
setLocalStorage(options: StorageConfig): Promise<any>;
/**
@getLocalStorage
* Get data in local storage
*/
getLocalStorage(options: GetStorageConflig): Promise<any>;
/**
@removeLocalStorageItem
* Remove data in local storage
*/
removeLocalStorageItem(key: string): Promise<any>;
/**
@getLocalStorageLength
* Get total local storage
*/
getLocalStorageLength(): Promise<any>;
/**
@getLocalStorageAllKey
* Get all local storage KEY list
*/
getLocalStorageAllKey(): Promise<any>;
clearAllLocalStorage(): Promise<unknown>;
/**
@SessionStorage Service
*/
/**
@setSessionStorage
* Set data in session storage
*/
setSessionStorage(options: StorageConfig): Promise<any>;
/**
@getSessionStorage
* Get data in session storage
*/
getSessionStorage(options: GetStorageConflig): Promise<any>;
/**
@getSessionStorageLength
* Get total session storage
*/
getSessionStorageLength(): Promise<any>;
/**
@getSessionStorageAllKey
* Get all session storage KEY list
*/
getSessionStorageAllKey(): Promise<any>;
/**
@removeLocalStorageItem
* Remove data in local storage
*/
removeSessionStorageItem(key: string): Promise<any>;
clearAllSessionStorage(): Promise<unknown>;
private convertJsonToString;
private convertStringToJson;
private saveDataInLocalStorage;
private saveDataInSessionStorage;
}