1.0.13 • Published 10 months ago

@jswork/next-store v1.0.13

Weekly downloads
1
License
MIT
Repository
-
Last release
10 months ago

next-store

Storage for weapp based on next.

version license size download

installation

npm install -S @jswork/next-store

apis

apiparamsdefaultdescription
$(name, purify)-Select local/session engine instance.
config(options)-Select local/session engine instance.

usage

import NxStore from '@jswork/next-store';

// init with namespace(prefix)
const store = new NxStore({ prefix:'abc', purify: true });

// set
store.local = { name:'nx', github:'afeiship', items:['next','gem','nx']}

// get
const { name } = store.local;

// get/gets/set/sets/del/dels/clear
store.$('local').del('nx');
store.$('local', true).del('xxx');

store.config({ prefix:'myprefix'})

license

Code released under the MIT license.