You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

web-local-storage

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

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.

0.1.8
Source
npmnpm
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
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

localStorage

FAQs

Package last updated on 19 Dec 2022

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