Socket
Book a DemoInstallSign in
Socket

storage-exp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storage-exp

localStorage with max-age 封装了localStorage,使之像redis那样拥有过期时间

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

Storage

localStorage with max-age 封装了localStorage,使之像redis那样拥有过期时间

install

npm i storage-exp -S

method

import Storage from 'storage-exp';

async function test() {
  await Storage.set({
    key: 'demo',
    value: {a:'haha'},
    age: 60 // seconds, default is forever, 0 is immediately delete,
  });
  
  const data = await Storage.get('demo');
}

Keywords

localStorage

FAQs

Package last updated on 18 Sep 2019

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