Wondering what’s next for npm?Check out our public roadmap! »

    localstorage-ttl

    1.0.2 • Public • Published

    localstorage-ttl

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

    Install:

    npm install localstorage-ttl --save
    

    Usage:

    const ls = require('localstorage-ttl');
    
    ls.set(variable, value, [ttl_ms]);
    ls.get(variable);
    
    • ttl_ms = time to live time in ms.

    if ttl_ms is not set it will be without expire date and will be there till user deletes or your other js deletes it.

    Install

    npm i localstorage-ttl

    DownloadsWeekly Downloads

    331

    Version

    1.0.2

    License

    MIT

    Last publish

    Collaborators

    • avatar