@gibme/lazy-storage
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Simple In-Memory KVS Storage System Wrapped around Node-Cache

Accepts arbitrary keys and values as it will JSON encode all keys and values before storing and will parse the JSON when retrieving.

Documentation

https://gibme-npm.github.io/lazy-storage/

Sample Code

import LazyStorage from '@gibme/lazy-storage';

const storage = new LazyStorage();

{
    storage.set({ some: 'key' }, { some: 'value' });

    const data = storage.get({ some: 'key' });

    if (data) {
        console.log(data);
        
        storage.del({ some: 'key' });
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @gibme/lazy-storage

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

19.1 kB

Total Files

6

Last publish

Collaborators

  • brandonlehmann