1.0.3 • Published 3 months ago

dynamiclocalmanage v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

API Reference

The "dynamiclocalmanage" is a lightweight and versatile npm package designed to simplify the management of browser local storage. Tailored for developers working with the MERN stack and proficient in Python, this package offers a set of intuitive functions for common local storage operations.

Key Features:

Easy Data Retrieval: Retrieve stored data effortlessly using the getDataLocal and getDataLocalArray functions. These functions provide a seamless way to access stored information based on the specified data name.

Efficient Data Storage: Store data with confidence using the setDataLocal function. It accepts both single values and arrays, providing flexibility in handling various data structures.

Data Removal: The removeDataLocal function simplifies the process of removing data from local storage, streamlining your cleanup operations.

Array Manipulation: For scenarios involving arrays, the package includes addDataArray. This function appends new data to an existing array stored in local storage, promoting efficient array management.

Error Handling: Robust error handling ensures a smooth experience, with detailed error messages logged in the console. This aids developers in identifying and addressing issues promptly.

Security Considerations: The package incorporates best practices for security, such as data validation and sanitization, to guard against potential vulnerabilities.

Get all items

  import {} from "dynamiclocalmanage"

LocalStorage

ParameterTypeDescription
getDataLocalstringGet data the localstorage
setDataLocalstring anySet the data in localstorage
removeDataLocalstringRemove instance the localstorage
checkDataLocalstringChecks for the existence of the instance name
getDataLocalArraystringObtain data parsed Array
addDataArraystring anyAdd new data to array
1.0.2

SessionStorage

ParameterTypeDescription
getDataSessionstringGet data the localstorage
setDataSessionstring anySet the data in localstorage
removeDataSessionstringRemove instance the localstorage
checkDataSessionstringChecks for the existence of the instance name
getDataSessionArraystringObtain data parsed Array
addDataSessionArraystring anyAdd new data to array