hr.storage

1.0.0 • Public • Published

hr.storage Build Status

Local storage and caching utility

Installation

$ npm install hr.storage

Documentation

Read/Write localstorage

var storage = require("hr.storage");

// Read a value from storage
storage.get("hello");

// Write a value in storage
storage.set("hello", "world");

// JSON-Serializable object can be used
storage.set("hello", { message: "World" });

Cache

var Cache = require("hr.cache").Cache;

var cache = new Cache({
    namespace: "files"
});

// Set a value
cache.set("README.md", { content: "File content "}, 60*1000);

Readme

Keywords

none

Package Sidebar

Install

npm i hr.storage

Weekly Downloads

61

Version

1.0.0

License

none

Last publish

Collaborators

  • samypesse