Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 676 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 676 Bytes

@mlz/Store

Codacy Badge

封装localStorage, sessionStorage, cookie, indexDB.

安装

npm i @mlz/store

使用

import createStore from '@mlz/store';

const store = createStore({}); // 默认是localStorage, 通过type: 'sessionStorage'|'cookieStorage'|'indexDB'区分

store.set({a: 1});
store.update({a: 1});
store.delete('a');
store.get('a');

TODO

  1. indexDB
  2. remove lodash.merge(it takes 54kb)