1.0.0 • Published 2 years ago

@tpaul/localstorage-json v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

LocalStorage(+JSON)

A simple wrapper that adds convenience setJSON and getJSON methods to node-localstorage

Makes for a very quick and convenient key value store for testing and other lightweight tasks.

Usage:

const LocalStorage = require('json-localstorage');
const storage = new LocalStorage(`${__dirname}/var`);

const hovercraft = {
    isFullOfEels: true
};

storage.setJSON('myCraft', hovercraft);

console.log(storage.getJSON('myCraft'));
1.0.0

2 years ago