Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wezz/store-manager

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wezz/store-manager

A script to manage local and session storage

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
133
increased by62.2%
Maintainers
1
Weekly downloads
 
Created
Source

Store Manager

This is a script to make it easier to talk to localStorage and sessionStorage.

It will automatically transform stored JSON to objects.

It also makes use of prefixed store values. So you can have multiple instances of the storage manager using the same store values without having conflicts.

Installation

npm install @wezz/store-manager

Usage

Initialize Store Manager

import { StoreManager } from "@wezz/store-manager";
// On document ready
const storeManager = new StoreManager('prefix');
// Save to localStorage
storeManager.Set('keyname', {'jsondatakey': 'jsondatavalue'}, true);
// Save to sessionStorage
storeManager.Set('keyname', {'jsondatakey': 'jsondatavalue'});
storeManager.Get('keyname');

See demo/example1.js for more advanced usage

Development & Demo

Clone this repo Run npm install

To run the demo, run npm run dev

Keywords

FAQs

Package last updated on 28 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc