1.0.0 • Published 6 years ago

steerable-storage v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

steerableStorage

A easy web storage manager;

Install

npm install steerableStorage --save

Usage

import SteerableStorage from 'steerableStorage'

const storage = new SteerableStorage('localStorage', 'projectName')

// add or update storage
storage.getItem('key', 'value')

// remove storage
storage.removeItem('key')

// clear all project storage
storage.clear()

// view all valid storage
storage.values

Arguments

paramstyperequireddefaultoptions
storagestringtrue'localStorage'、'sessionStorage'
prefixstringtrue
expiresnumberfalse1000 3600 24 * 30
versionnumber/stringfalse1