0.1.1 • Published 11 years ago

headstorage v0.1.1

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

hEaDstorage

v0.1.1

A persistent storage which provides HTML5 WebStorage-like APIs for Node.js

Install

npm install headstorage

How to use

var HEADSTORAGE = require('headstorage');
var storagePath = 'storageFile';
var storage = new HEADSTORAGE(storagePath, true);

Manipulation

// 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;
0.1.1

11 years ago

0.1.0

11 years ago

0.0.0

11 years ago