$ npm install json-storage-fs
json-storage-fs is a very lightweight package with no dependencies that was designed for small Node.js applications
Example:
const Storage = require('json-storage-fs');
Storage.set('name', 'Alice');
const name = Storage.get('name');
console.log(name); // -> 'Alice'
Get value from key
static get(key: string): any|undefined
Set value
static set(key: string, data: any): void
Delete value by key
static delete(key: string): void
Get all high-level keys
static getAllKeys(): string[]
Clear storage
static clearAll(): void