Socket
Socket
Sign inDemoInstall

web-local-storage

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    web-local-storage

Convenience class to work with localStorage. Implements the same interface as js-cookie.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
7.97 kB
Created
Weekly downloads
 

Readme

Source

web-local-storage

web-local-storage implements a convenience interface to access localStorage.

Installation

NPM
  $ npm install web-local-storage --save
Yarn
  $ yarn add web-local-storage

Basic Usage

On the client

It implements the same interface as js-cookie for interoperability.

import WebLocalStorage from "web-local-storage";
const els = new WebLocalStorage();

// Set local storage
els.set("user", {userName: "test", token: "some token here"}, { expires: 30 });

// Retrieve
const user = els.get("user");

// Clear
els.remove("user");

Authors

  • Alexander Fedorenko

Keywords

FAQs

Last updated on 16 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc