@dotburo/ls-ttl

1.3.0 • Public • Published

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'),
);

Readme

Keywords

none

Package Sidebar

Install

npm i @dotburo/ls-ttl

Weekly Downloads

0

Version

1.3.0

License

GPL-3.0-or-later

Unpacked Size

23.2 kB

Total Files

11

Last publish

Collaborators

  • pecuchet