A set of functions to manage web storage including local storage, session storage, and cookies. 💖
-
Web Browser
- Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera]. -
Internet
- Because many use CDN and to make it easier to find solutions to all problems.
const WebStorage = require('./src/webStorage');
// Create a new instance with localStorage
const localStorageWrapper = new WebStorage('localStorage');
// Set an item
localStorageWrapper.setItem('key', 'value');
// Get an item
const value = localStorageWrapper.getItem('key');
console.log(value); // Output: value
// Remove an item
localStorageWrapper.removeItem('key');
// Clear all items
localStorageWrapper.clear();
- This package provides a simple abstraction layer for working with web storage (localStorage or sessionStorage). It allows you to easily set, get, remove, or clear items from the storage.
-
setItem(key, value)
: Sets the value for the specified key in the storage. -
getItem(key)
: Retrieves the value for the specified key from the storage. -
removeItem(key)
: Removes the item with the specified key from the storage. -
clear()
: Removes all items from the storage.
- v1.0.0 : 08 March 2024
- v1.0.1 : 11 March 2024
- v4.0.0 : 11 March 2024
- v4.0.1 : 13 March 2024
- v4.0.2 : 18 March 2024
- v5.0.0 : 31 March 2024
- Facebook : Oned Ionys
- Instagram : @onedionys
- Twitter : @onedionys
- LinkedIn : @onedionys
- Copyright © 2024 One Dionys
- One Dionys - Web Storage Abstraction is an open source project licensed under the MIT license
Love One Dionys - Web Storage Abstraction? Support this project by donating or sharing with others in need.
Made with ❤️ One Dionys