Skip to content
/ ls-ttl Public

LocalStorage with expiration and random keys

Notifications You must be signed in to change notification settings

dotburo/ls-ttl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LocalStorage helper

Adds expiration to entries

Usage

let client = new Ls({
    keyPrefix: 'ls-',
    ttlSuffix: '-ls-ttl',
    encrypt: btoa
});

client.set('hello1', 'world1', 60);

console.log(
    client.get('hello1'),
    client.getTTL('hello1'),
);

About

LocalStorage with expiration and random keys

Resources

Stars

Watchers

Forks

Packages

No packages published