Skip to content

bhaskarmelkani/ls.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

ls.js

Localstorage wrapper with a support of time to live.

Usage:-

To save an item in localStorage with a ttl(time to live).

ls.setItem(key, value, timeinmilliseconds);

ls.setItem('a', 'b', 1000);

when you dont want any ttl: ls.setItem('a','b');

To get item from localStorage.

ls.getItem('a');

To remove and item from localStorage.

ls.removeItem('a');

NOTE: The ttl will persist even if the browser is closed.

About

Intelligent Local Storage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published