@nethesis/vue-components
Version:
This library contains: - a collection of Vue 3 components based on [Flowbite](https://flowbite.com/) - a set of utility functions
39 lines • 1.35 kB
TypeScript
/**
* Save a string or a JSON object to local storage
*
* @param name name of the entry
* @param value value of the entry
*/
export declare const saveToStorage: (name: string, value: any) => void;
/**
* Get a JSON object from local storage
*
* @param name name of the entry
* @returns a JSON object
*/
export declare const getJsonFromStorage: (name: string) => any;
/**
* Get a string from local storage
*
* @param name name of the entry
* @returns the string value of the entry
*/
export declare const getStringFromStorage: (name: string) => string | null;
export declare const deleteFromStorage: (name: string) => void;
/**
* Save a user preference to local storage entry "preferences-<username>"
*
* @param preferenceName name of the preference
* @param preferenceValue string or JSON object
* @param currentUsername username currently logged in
*/
export declare const savePreference: (preferenceName: string, preferenceValue: any, currentUsername: string) => void;
/**
* Get a user preference from the local storage entry "preferences-<username>"
*
* @param preferenceName name of the preference
* @param currentUsername username currently logged in
* @returns a string or a JSON object
*/
export declare const getPreference: (preferenceName: string, currentUsername: string) => any;
//# sourceMappingURL=storage.d.ts.map