A persistent storage which provides HTML5 WebStorage-like APIs for Node.js
npm install headstorage
var HEADSTORAGE = require('headstorage');
var storagePath = 'storageFile';
var storage = new HEADSTORAGE(storagePath, true);
// Set an item by specific key
storage.setItem('name', 'hEaD');
// Get an item by specific key
var name = storage.getItem('name');
// Remove an item by specific key
storage.removeItem('name');
// Remove all items
storage.clear();
// Get the n-th item
var item = storage.key(n);
// Get the amount of items
var amount = storage.length;
- - - ###### by _Yen-Chun Hsu_ ####### - - -