2.0.10 • Published 9 months ago

localstorage-ttl v2.0.10

Weekly downloads
236
License
MIT
Repository
github
Last release
9 months ago

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/

2.0.3

9 months ago

2.0.2

9 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.9

9 months ago

2.0.10

9 months ago

2.0.8

9 months ago

2.0.1

9 months ago

1.0.2

10 years ago

1.0.1

10 years ago