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

localstorage-ttl

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

localstorage-ttl

TS module to save data to localstorage with time to live. Data will expire after set time.

  • 2.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
352
decreased by-12.66%
Maintainers
0
Weekly downloads
 
Created
Source

localstorage-ttl

TS module to save data to localstorage with time to live. Data will expire after set time. On npm: https://www.npmjs.com/package/localstorage-ttl

Updated to TS (v2) after 9yr of JS (v1) 🎉

Install:

npm install localstorage-ttl --save

Usage:

import ls from 'localstorage-ttl';

ls.set(variable, value, [ttl_ms]);
ls.get(variable);
ls.remove(variable);
  • ttl_ms = time to live time in ms.

if ttl_ms is not set it will stay without expire date and will be there till deleted.

You may contact me here: https://lukasliesis.com/

Keywords

FAQs

Package last updated on 06 Oct 2024

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